NanmiCoder / NanmiCoder/MediaCrawler
[问题] 界面的疑问
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 65.3k
- Forks
- 12.6k
- PR merge metrics
- No merged PRs in 30d
Description
⚠️ 提交前确认
- 我已经仔细阅读了项目使用过程中的常见问题汇总
- 我已经搜索并查看了已关闭的issues
- 我确认这不是由于滑块验证码、Cookie过期、Cookie提取错误、平台风控等常见原因导致的问题
❓ 问题描述
是怎么运行了Chrome,就用Chrome打开一个平台有何用意?运行没多久突然报错
🔍 使用场景
- 目标平台: (如:小红书/抖音/微博等) 各个平台
- 使用功能: (如:关键词搜索/用户主页爬取等) 关键词搜索
💻 环境信息
- 操作系统: WIndows
- Python版本: python3.13
- 是否使用IP代理: 否
- 是否使用VPN翻墙软件:否
- 目标平台(抖音/小红书/微博等):各个
📋 错误日志
在此粘贴完整的错误日志
Traceback (most recent call last):
File "MediaCrawler-main\main.py", line 78, in
asyncio.get_event_loop().run_until_complete(main())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "Python\Lib\asyncio\base_events.py", line 719, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "MediaCrawler-main\main.py", line 65, in main
await crawler.start()
File "MediaCrawler-main\media_platform\bilibili\core.py", line 109, in start
await self.search()
File "MediaCrawler-main\media_platform\bilibili\core.py", line 129, in search
await self.search_by_keywords()
File "MediaCrawler-main\media_platform\bilibili\core.py", line 244, in search_by_keywords
await self.batch_get_video_comments(video_id_list)
File "DMediaCrawler-main\media_platform\bilibili\core.py", line 399, in batch_get_video_comments
await asyncio.gather(*task_list)
File "\MediaCrawler-main\media_platform\bilibili\core.py", line 414, in get_comments
await self.bili_client.get_video_all_comments(
...<5 lines>...
)
File "MediaCrawler-main\media_platform\bilibili\client.py", line 299, in get_video_all_comments
if len(result) + len(comment_list) > max_count:
~~~^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
📷 错误截图
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure from main.py using the Bilibili keyword-search path, then trace through media_platform/bilibili/core.py into client.py around line 299. Check how result and comment_list are produced before the failing length calculation. Done means the reported search flow no longer raises the NoneType error and its behavior is covered by the project’s existing checks, if applicable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100