Comments (4)
可以参考这个https://github.com/dataabc/weibo-follow,此程序是获取给定user_id用户关注列表中多个用户的user_id,然后再获取对应的微博。爬用户粉丝的思路差不多,可以仿照这个方式获取粉丝信息。不过因为限制,一个用户好像最多只能爬200个关注和粉丝。
from weibo-crawler.
好的,谢谢。还有个问题,我现在有了一份id文件,但是不能保证里面的id都正确,我要怎么修改代码直接跳过不正确的id而不是报错停下来啊?
from weibo-crawler.
修改两个方法,get_page_count和get_pages,把get_page_count中的sys.exit去掉,你可以换成print之类的打印出错信息;给get_pages方法加上try ..except...语句,原来的代码都放到try里。这样就可以了
from weibo-crawler.
好的,已经可以了,感谢!
from weibo-crawler.
Related Issues (20)
- docker镜像 HOT 1
- 某行是一条独立换行内容的时候这个换行最终读取到MYSQL会被省略掉
- 微博内容(Weibo.text)最大长度报错问题 HOT 1
- 求助-爬微博进度100%,但是数量明显跟实际数量不一致有可能是何原因? HOT 3
- 如何爬取微博正文时展开全文爬取到完整内容 HOT 1
- COOKIES没有失效,但是Progress: 19%就结束了,可能是什么原因? HOT 3
- 当单个微博图片超过9张时,weibo-crawler只能下载9张 HOT 2
- 爬取的图片名字里有一个奇怪的T HOT 1
- “检测cookie是否有效”的功能失效 HOT 2
- 怎么爬取用户的ip归属地呢? HOT 7
- 请问下载的评论在哪 HOT 1
- 转发和评论好像出现了奇怪的问题 HOT 1
- csv中抓取的用户头像链接有时候会失效怎么解决? HOT 1
- sqlite储存数据非常大 HOT 1
- Docker 定时跑时,图片和视频是否是反复下载?
- since_date 格式不正确,请确认配置是否正确 HOT 6
- 被ban了 HOT 1
- 无法爬取地区、学校、生日相关信息 HOT 3
- 微博爬取截止时间 HOT 2
- 运行之后总是显示config.json格式不正确 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weibo-crawler.