SuperAPIAI Directory

MediaCrawler

github.com · Other AI tools

Self-media crawler tool that scrapes information such as videos, images, comments, likes, and shares from Xiaohongshu, Douyin, Kuaishou, Bilibili, and Weibo.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

MediaCrawler is a powerful multi-platform self-media data collection tool that supports scraping publicly available information from mainstream platforms such as Xiaohongshu, Douyin, Kuaishou, Bilibili, Weibo, Tieba, and Zhihu, covering content such as notes, videos, posts, Q&A articles, and comments.

Purpose This project is positioned as a technical research and learning tool for exploring and learning web data collection technology. The official statement explicitly states that it is for learning and reference only, and commercial use or any illegal use is prohibited.

Main capabilities

  • Supports data collection from multiple platforms: Xiaohongshu notes and comments, Douyin videos and comments, Kuaishou videos and comments, Bilibili videos and comments, Weibo posts and comments, Baidu Tieba posts and comment replies, Zhihu Q&A articles and comments.
  • The core technology is based on the Playwright browser automation framework for logging in and saving the login state.
  • No JS reverse engineering required: by using a browser context that preserves the login state, signature parameters are obtained through JS expressions, avoiding reverse engineering of complex encryption algorithms and lowering the technical threshold.
  • Media file download (disabled by default): when enabled, media files can be downloaded locally at the same time as crawling, stored aggregated by post, supporting Xiaohongshu, Douyin, Kuaishou, Bilibili, and Weibo; Tieba and Zhihu are not currently supported because there are no media fields in their data structures. After installing ffmpeg, the DASH path can be used to obtain the highest quality (audio and video are downloaded as separate tracks and then merged losslessly); if not installed, it automatically degrades to direct mp4 links. Bilibili clarity is controlled by BILI_QN in config/bilibili_config.py (default 80 = 1080p). Media download failures are only logged and will not interrupt crawling; existing files are skipped. Downloads are serial and follow the crawling process, with no concurrent downloads.
  • WebUI visual interface: crawler functionality can be used without the command line, and crawler parameters can be configured visually (platform, login method, crawl type, etc.).
  • Supports multiple data storage methods: CSV, JSON, JSONL, Excel, SQLite, and MySQL databases.
  • Crawling Douyin and Zhihu requires Node.js to be installed in advance, version 16 or higher.
  • Provides a MediaCrawlerPro version, which lists the following advantages compared to the open-source version: breakpoint-resume crawling, multi-account + IP proxy pool support, removal of the Playwright dependency, full Linux environment support, code refactoring and optimization, enterprise-grade code quality, perfect architecture design, AI Agent Skill support (Codex / OpenClaw / Hermes / Claude Code / DeepSeek Harness / cc-haha / WorkBuddy / Doubao / Trae / Qoder / Cursor one-click installation), comment analysis Agent, self-media content breakdown Agent, multi-platform homepage information feed recommendation (HomeFeed) and trending search rankings, self-media video downloader desktop client, AI image generation Agent. The Pro version requires a subscription for support; specific pricing information is not yet available.

How to use Prerequisite dependencies: uv (Python package management tool) must be installed, and Node.js must be installed (version >= 16.0.0). Browser configuration (recommended): The project uses CDP mode by default to connect to the user's existing Chrome browser, allowing reuse of existing login states, Cookies, extensions, etc., reducing the risk of platform risk-control detection. The latest version of Chrome browser must be installed (version >= 144); enter chrome://inspect/#remote-debugging in the address bar and check "Allow remote debugging for this browser instance". When the page displays Server running at: 127.0.0.1:9222, it is ready. After running the crawler, Chrome will pop up a confirmation dialog; click "Accept". The program will wait for user confirmation, and the operation can be completed within 60 seconds. If the default CDP mode is used, there is no need to install a browser driver; it is only required when using standard Playwright mode. You can set ENABLE_CDP_MODE = False in config/base_config.py to switch to standard Playwright mode. WebUI usage: During development, the backend API service and the frontend Vite development server need to be started at the same time. After successful startup, visit http://localhost:5173/ to open the WebUI. On first opening, an environment check will be performed (calling /api/env/check). Make sure the backend service has been started. If the check fails, you can click "Skip Check" to temporarily skip it. If you want to serve the WebUI static resources directly through the API server, you need to build the frontend first, then start only the API server and visit http://localhost:8080。

Applicable scenarios

  • Learning and research-oriented collection of publicly available information on self-media platforms.
  • Learning and studying the architecture design of mature projects, including crawler technology and code design approaches.
  • Experimental uses such as data storage and writing media files to disk.

Limitations

  • The official statement is that all content is for learning and reference only, and commercial use is prohibited, as is use for illegal purposes or infringement of the legitimate rights and interests of others. It must not be used for large-scale crawler operations against other platforms or other illegal acts.
  • The data structures of Tieba and Zhihu do not have media fields, so the media download function does not currently support these two platforms.
  • Media download is in serial mode and does not support concurrent downloads.
  • Crawling Douyin and Zhihu requires a Node.js environment (>= 16).
  • CDP mode must be used with the Chrome browser (version >= 144).
  • The official project reminds users to comply with relevant laws and regulations; users bear the legal responsibility arising from use themselves.

Project address:https://github.com/NanmiCoder/MediaCrawler

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools