[问题] 知乎基于问题的搜索

作者: qingyu-wang创建于 2025年12月5日更新于 2026年9月21日
标签question

⚠️ Confirm before submission

  • I have carefully read the common problems summary in the project usage process.
  • I have searched and viewed the closed issues
  • I confirm that this is not a problem caused by slider verification codes, expired cookies, incorrect cookie extraction, platform risk control, etc.

❓ Problem description

Currently, Zhihu does not seem to have a function to crawl all the answers under a question.
In zhihu_config.py,

python
# Specify the list of Zhihu user URLs
ZHIHU_CREATOR_URL_LIST = [
    "https://www.zhihu.com/people/yd1234567",
    # ........................
]
# Specify the list of Zhihu IDs
ZHIHU_SPECIFIED_ID_LIST = [
    "https://www.zhihu.com/question/826896610/answer/4885821440",  # Answer
    "https://zhuanlan.zhihu.com/p/673461588",  # Article
    "https://www.zhihu.com/zvideo/1539542068422144000",  # Video
]
In this case, only the answer option `https://www.zhihu.com/question/826896610/answer/4885821440` is available, and the question option `https://www.zhihu.com/question/826896610` is not available. If the code is changed to:  
```Python
ZHIHU_SPECIFIED_ID_LIST = [
    "https://www.zhihu.com/question/826896610"  # Question
]
No results are obtained.  
Can you add a function to crawl based on questions? I think it is a common requirement to analyze and research answers under questions. I hope it can be recognized.  
## Use case  
<!-- Describe the problem you encountered when using a particular function -->  
- Target platform: Zhihu  
- Function used: Question page crawling  
## Environment information  
- Operating system: MacOS  
- Python version: 3.12.12  
- Whether to use IP proxy: No  
- Whether to use VPN to bypass the Great Firewall: No  
- Target platform (Douyin, Little Red Book, Weibo, etc.): Zhihu  
## Error log  
```shell  
None

内容来源: NanmiCoder/MediaCrawler