Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

根据关键字爬取图片 #2

Open
Echosanmao opened this issue Jul 13, 2020 · 3 comments
Open

根据关键字爬取图片 #2

Echosanmao opened this issue Jul 13, 2020 · 3 comments

Comments

@Echosanmao
Copy link

您好,运行该代码时发现必须指定用户Id或者用户名,如果想根据某一个关键词 下载任意用户的作品,不指定用户,该如何运行呢?
感谢指导!

@zeeww
Copy link

zeeww commented Jul 13, 2020

按关键字获取数据:
https://www.zcool.com.cn/search/content?word=关键字

判断有多少页,再调用下面接口:
https://www.zcool.com.cn/search/content?type=0&field=0&other=0&sort=5&word=关键字&recommend=0&time=0&p=页数

把每一页的里面的作品的<username><topic>信息提取出列表里,
再按该项目的python crawler.py -u <username> -t <topic>命令行来爬取

大概思路是这样的,供参考

@lonsty
Copy link
Owner

lonsty commented Jul 20, 2020

@Echosanmao 抱歉,才看到。

目前不支持根据关键字下载,主要是考虑到根据关键字搜索的内容质量参差不齐,下载的作品可能绝大部分不是想要的。

等我有空可以增加这个功能,最近太忙了。

@lonsty
Copy link
Owner

lonsty commented Dec 1, 2020

可以自己建一个收藏夹,收录 topic 后下载整个收藏夹 #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants