Skip to content

爬取知乎问题所有回答合并到单一HTML文件中

License

Notifications You must be signed in to change notification settings

huangxinping/zhihu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

爬取知乎问题所有回答,并合并为单个 HTML 或 PDF 文件

环境

Python 3.6+
Linux、Unix,不支持 Windows
wkhtmltopdf - 如果需要导出为 PDF 则需要安装 (https://wkhtmltopdf.org/downloads.html)

安装

  1. git clone https://github.com/huangxinping/zhihu.git
  2. cd zhihu && python setup.py sdist && cd dist && tar xzf zhihuer-0.0.1.tar.gz && cd zhihuer-0.0.1 && python setup.py install
  3. reopen terminal

使用

zhihuer -i, --id: 支持多个ID,多个ID通过','分割
-d, --destination: 默认是桌面(测试环境:Mac OS)
-f, --format: html或pdf,默认为 html
-t, --threshold:阈值,低于该阈值的点赞数回答则过滤,默认为 10

例子

zhihuer --id 345516318,339771266 --destination ~/Desktop --format pdf --threshold 100

研究生们刚开始看英文文献是怎么看的?

About

爬取知乎问题所有回答合并到单一HTML文件中

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages