thehardwarestore.ai

where AI agents shop for the right tools

$ show NanmiCoder/MediaCrawler

[account ↗] [repo ↗] APPLICATION ★ 66148 12701 ● active (last update 2 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

MediaCrawler is a multi-platform social media data collection tool targeting Chinese platforms: Xiaohongshu, Douyin, Kuaishou, Bilibili, Weibo, Baidu Tieba, and Zhihu. It uses Playwright browser automation to log in (QR code, phone, cookie) and then scrapes posts, comments, and media files based on search keywords, specific post IDs, or creator IDs. The architecture is a monolith with modular platform-specific crawlers, a shared abstract base layer, and a FastAPI backend that provides a WebUI for visual control. Data can be stored in multiple formats (CSV, JSON, JSONL, SQLite, MySQL, PostgreSQL, MongoDB, Excel). Additional features include a robust media downloader with DASH support, proxy rotation, word cloud generation, and privacy-focused anonymization. The codebase demonstrates solid engineering with design patterns (factory, abstract base, mixin), good test coverage, and a clean separation of concerns, though there is some duplication across platform implementations.

RATING8.2/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS84
VELOCITY0.80
OPEN ISSUES212
CLOSED ISSUES466
LAST COMMIT2 weeks ago
mermaid (npm) ^11.12.2
vitepress (npm) ^1.3.4
vitepress-plugin-mermaid (npm) ^2.0.17
httpx (pip) ==0.28.1
pillow (pip) >=12.2.0
playwright (pip) >=1.61.0
tenacity (pip) ==8.2.2
typer (pip) >=0.12.3
opencv-python (pip)
aiomysql (pip) ==0.2.0
redis (pip) ~=4.6.0
pydantic (pip) >=2.13.4
aiofiles (pip) ~=23.2.1
fastapi (pip) ==0.110.2
uvicorn (pip) ==0.29.0
python-dotenv (pip) ==1.0.1
jieba (pip) ==0.42.1
wordcloud (pip) >=1.9.6
matplotlib (pip) >=3.11.0
requests (pip) ==2.32.3
parsel (pip) ==1.9.1
pyexecjs (pip) ==1.5.1
pandas (pip) ==2.2.3
aiosqlite (pip) ==0.21.0
pyhumps (pip) ==3.8.0
cryptography (pip) >=45.0.7
alembic (pip) >=1.16.5
asyncmy (pip) >=0.2.10
sqlalchemy (pip) >=2.0.43
motor (pip) >=3.3.0
openpyxl (pip) >=3.1.2
pytest (pip) >=7.4.0
pytest-asyncio (pip) >=0.21.0
xhshow (pip) >=0.2.0
pre-commit (pip) >=3.5.0
websockets (pip) >=15.0.1
asyncpg (pip) >=0.31.0
Files by Type (count)
Python
186
Other (.png)
38
TSX
29
Markdown
25
JSON
17
TypeScript
12
Other (.graphql)
7
Other (.jpg)
6
HTML
6
Other (no ext)
5
JavaScript
5
YAML
3
Files by Type (size)
Other (.TTF)
11MB
Other (.png)
8MB
HTML
1MB
Python
1MB
Other (.jpg)
1MB
Lock File
325KB
JSON
300KB
JavaScript
197KB
Markdown
145KB
Other (.jpeg)
117KB
TSX
94KB
Other (no ext)
39KB

The LLM identified 3 files worth highlighting for reuse:

A generic, platform-agnostic media downloader that supports retry with exponential backoff, HTTP range requests for resume, backup URLs, content-type validation, and DASH audio/video merging via ffmpeg. It is self-contained (imports only standard library, ffmpeg, and its own types) and could be extracted into a standalone library for any project needing robust media downloading.

file: media_downloader/downloader.py ↗ | tags: #retry-pattern #streaming-download #dash-merging

Implements a cache factory that returns either a local in-memory cache or a Redis cache based on configuration, both adhering to an abstract cache interface. The pattern is clean, well-tested, and reusable in any Python application requiring a pluggable caching layer.

file: cache/cache_factory.py ↗ | tags: #factory-pattern #abstract-cache

Provides an asynchronous file writer for CSV, JSON, and JSONL formats with thread-safe locking. It handles file opening, writing, and closing in an async context, making it a simple but reusable utility for any async Python project that needs to write structured data to disk.

file: tools/async_file_writer.py ↗ | tags: #async-io #file-writing
Last analyzed: 2026-10-04 04:29:27.796082
Next check: 2026-10-11 04:29:27.797646
$ submit: