Commit Graph
21 Commits
Author SHA1 Message Date
butubb 4e60524f37 feat: 监控面板 / 登录鉴权 / 多平台切换 / MySQL
Deploy VitePress site to Pages / build (push) Canceled after 0s
Deploy VitePress site to Pages / Deploy (push) Canceled after 0s
在上游 MediaCrawler 之上新增一层:

- 监控层 api/monitor/ —— 多博主/多笔记的定时采集、指标快照差分、报表、
  企业微信通知。每轮采集写入独立目录,差分才成立。
- WebUI 登录鉴权 api/auth.py —— PBKDF2 口令 + 服务端会话,/api 全接口防护。
  WebSocket 单独加依赖:BaseHTTPMiddleware 对 ws 作用域直接放行,覆盖不到。
- 全局平台切换 + 能力矩阵 —— 如实区分「爬虫模块支持」与「监控层已接线」,
  未接通的平台直接拒绝建任务,而不是静默跑空。
- 监控库改用 MySQL 5.7(可回退 SQLite 供测试):逐表强制 utf8mb4
  (服务端与库默认都是 latin1),启动校验所连 schema 以防写错库,
  连接池 recycle + pre_ping 应对 MySQL 的 8 小时空闲断连。

修复上游缺陷:

- xhs/core.py: 主页抓取失败会跳掉整个博主,导致一条作品都抓不到,
  而那份资料只喂给一个空函数。改为尽力而为,失败不中断。
- xhs/login.py: cookie 登录只注入 web_session,冷启动签名会失败。
  新增 INJECT_ALL_COOKIES 开关(默认关闭,原有行为不变)。
- requirements.txt: 补上 websockets。它在上游 pyproject.toml 里有声明、
  这里漏了,导致 uvicorn 没有 WebSocket 能力,实时日志流从未工作。

改动过的上游文件清单及合并方式见 UPSTREAM.md。

测试:492 passed(另有 1 个既有的 Windows/gbk 上游测试失败,与本改动无关)
2026-10-07 09:58:40 +08:00
Junwen 2a52c15fb3 feat: 添加海外版小红书(rednote.com)支持 2026-04-08 23:12:53 +08:00
bear a59b385615 fix the login status error after scan the QR code 2026-01-09 14:11:47 +08:00
程序员阿江(Relakkes)andClaude Opus 4.5 157ddfb21b i18n: translate all Chinese comments, docstrings, and logger messages to English
Comprehensive translation of Chinese text to English across the entire codebase:

- api/: FastAPI server documentation and logger messages
- cache/: Cache abstraction layer comments and docstrings
- database/: Database models and MongoDB store documentation
- media_platform/: All platform crawlers (Bilibili, Douyin, Kuaishou, Tieba, Weibo, Xiaohongshu, Zhihu)
- model/: Data model documentation
- proxy/: Proxy pool and provider documentation
- store/: Data storage layer comments
- tools/: Utility functions and browser automation
- test/: Test file documentation

Preserved: Chinese disclaimer header (lines 10-18) for legal compliance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2025-12-26 23:27:19 +08:00
程序员阿江(Relakkes) ff8c92daad chore: add copyright to every file 2025-11-18 12:24:02 +08:00
Relakkes 9fe3e47b0f chore: 增加代码学习声明,严格禁止非法、禁止商业、不当用途 2024-10-20 00:43:25 +08:00
nelzomal eace7d1750 improve base config reading command line arg logic 2024-06-09 18:51:36 +08:00
Relakkes 4bba1447f8 feat: cache impl done 2024-06-02 19:57:13 +08:00
Relakkes e64df93edd feat: 由于xhs和dy现在检测playwright二维码登录了,大概率会出现滑块或者手机验证,增加登录态检测时间为5min,预留足够的时间手动过验证码。 2024-05-15 23:23:30 +08:00
Relakkes 67ec49498a refactor: rename xhs to xiaohongshu 2024-03-30 21:17:33 +08:00
Relakkes aba9f14f50 refactor: 规范日志打印
feat: B站指定视频ID爬取(bvid)
2023-12-23 01:04:08 +08:00
Relakkes f85fd97d25 fix: #10 2023-12-16 00:12:20 +08:00
Relakkes 1d3c2359e0 fix: 修复部分变量命名语义不明确 2023-07-30 21:30:26 +08:00
Relakkes bf659455bb fix: issue #22 2023-07-30 20:43:02 +08:00
Relakkes 4ff2cf8661 refactor: 优化代码 2023-07-29 15:35:40 +08:00
Nanmi 745e59c875 feat: 完善类型注释,增加 mypy 类型检测 2023-07-16 17:57:18 +08:00
Relakkes e5bdc63323 feat: xhs增加并发控制参数 2023-07-15 22:25:56 +08:00
Relakkes 2398a17e21 refactor: 优化抖音Crawler部分代码
fix: 日志初始化错误修复
2023-07-15 21:30:12 +08:00
Relakkes dad8d56ab5 feat: issue #14
refactor: 优化小红书crawler流程代码
2023-07-15 17:11:53 +08:00
Relakkes e5f4ecd8ec fix: issue #12 2023-07-03 19:34:37 +08:00
Relakkes b8093a2c0f refactor:优化部分代码
feat: 增加IP代理账号池
2023-06-27 23:38:30 +08:00