butubb
42f2209534
fix(douyin): 两个让抖音采集根本跑不起来的上游缺陷
...
Deploy VitePress site to Pages / build (push) Canceled after 0s
Deploy VitePress site to Pages / Deploy (push) Canceled after 0s
用户建了个抖音博主任务,两次都是 exit 1、产物目录空空。查下来是上游两处缺陷,
与我们那层监控无关 —— 但它们在别的网络上未必复现,所以社区里没人报。
1) media_platform/douyin/core.py:101 —— 首页 goto 永远等不到 load
await self.context_page.goto(self.index_url) # 默认 wait_until="load"
抖音首页的 load 事件不会触发(有长连接/埋点类请求一直挂着)。实测同一台 Chrome、
同一个地址:domcontentloaded 0.7 秒返回,load 等满 90 秒仍超时。后果是整个采集
一步没走就崩,退出码 1,看起来像「抖音不能用」。改成显式 domcontentloaded ——
上游的贴吧和知乎本来就是这么写的,抖音这个页面只是恰好属于「永远不 load」那类。
2) media_platform/douyin/login.py:266 —— 注入 cookie 后页面是陈旧的
login_by_cookies 把 cookie 塞进 context,但页面是在这之前加载的;SPA 只在加载时
读一次登录态,localStorage.HasUserLogin 还停在"未登录",紧接着 check_login_state
会对着这个陈旧值轮询到超时(600×1 秒=十分钟)再 sys.exit()。下一轮才正常,因为
那时 cookie 已在 profile 里 —— 表现是"第一次白等十分钟、第二次才行",很容易被当
偶发。修复:注入后 reload(domcontentloaded)。
与 xhs 那个 __INITIAL_STATE__ 快照问题是同一类:页面状态是加载那一刻的快照。
本仓库扫码登录与运营模块也各自踩过。
UPSTREAM.md 的第二类「上游 bug 修复」表补上这两条与成因说明(原来只有两条 xhs 的)。
验证:在服务器容器里手工复现,改完后真实采到数据 ——
Parsed sec_user_id: MS4wLjABAAAArLubjxXEcLeiqehxgk4il4AHMu0hXu6_qlmD8z5WmMs
get_all_user_aweme_posts ... video len : 1
douyin aweme id:7690458980574358513, title:中秋哪儿都堵...
产物落在 douyin/jsonl/ 下,顺带把适配器里「平台 id 是 dy、目录是 douyin」的映射
用真实输出证实了。
2026-10-10 15:29:02 +08:00
程序员阿江(Relakkes)
d614ccf247
docs: translate comments and metadata to English
...
Update Chinese comments, variable descriptions, and metadata across
multiple configuration and core files to English. This improves
codebase accessibility for international developers. Additionally,
removed the sponsorship section from README files.
2026-02-12 05:30:11 +08:00
程序员阿江(Relakkes) and Claude 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
660fd18a95
fix: dy login fix
2025-04-08 20:58:04 +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
df1e4a7b02
refactor: 抖音登录态检测不在抛出警告,可能会误导使用者
2024-05-27 22:44:35 +08:00
Relakkes
764bafc626
feat: 抖音登录态检测逻辑更新支持
2024-05-23 22:15:14 +08:00
Relakkes
e64df93edd
feat: 由于xhs和dy现在检测playwright二维码登录了,大概率会出现滑块或者手机验证,增加登录态检测时间为5min,预留足够的时间手动过验证码。
2024-05-15 23:23:30 +08:00
chunpat
6422500e32
Remove duplication Qrcode Show
2024-04-05 21:24:06 +08:00
Relakkes
aba9f14f50
refactor: 规范日志打印
...
feat: B站指定视频ID爬取(bvid)
2023-12-23 01:04:08 +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
e5f4ecd8ec
fix: issue #12
2023-07-03 19:34:37 +08:00
Relakkes
57437719bf
feat: 抖音三种方式登录实现 & 抖音滑块模拟滑动实现
2023-07-01 23:10:47 +08:00
Relakkes
b8093a2c0f
refactor:优化部分代码
...
feat: 增加IP代理账号池
2023-06-27 23:38:30 +08:00