Comments (7)
已经修改代码,现在是获取用户的信息并写入user_id_list.txt文件
文件内容是uri + 用户昵称的形式,uri既可以是user_id,也可以是个性域名。因为现在https://github.com/dataabc/weiboSpider中的user_id既可以是真的user_id,也可以是个性域名。
用本程序获取user_id_list.txt文件,然后用https://github.com/dataabc/weiboSpider获取用户信息非常方便。
具体步骤如下:
1.用本程序获取某用户的关注列表,生成user_id_list.txt文件;
2.将user_id_list.txt文件的绝对路径填入weiboSpider项目config.json文件的user_id_list参数后,执行程序
from weibo-follow.
已经修改代码,现在是获取用户的信息并写入user_id_list.txt文件
文件内容是uri + 用户昵称的形式,uri既可以是user_id,也可以是个性域名。因为现在https://github.com/dataabc/weiboSpider中的user_id既可以是真的user_id,也可以是个性域名。
用本程序获取user_id_list.txt文件,然后用https://github.com/dataabc/weiboSpider获取用户信息非常方便。
具体步骤如下:
1.用本程序获取某用户的关注列表,生成user_id_list.txt文件;
2.将user_id_list.txt文件的绝对路径填入weiboSpider项目config.json文件的user_id_list参数后,执行程序
感谢大佬的回复。辛苦啦
立马去试了一下,发现一个小问题。如果换一个id
weibo follow.py 84行的。
cmd出来的结果第一句,用户关注页数依然是20页,实际有50多页
然后尝试换了多个id, 依然是这个结果
看txt里结果只有200行。也就是说任意id都只能获取前20页。
是不是哪里限制了,要如何修改?
from weibo-follow.
这是官方限制的,最多200个。如果你想获得更多user_id,可以利用这200个user_id,每个id都可以获取200个,200个id就可以获取4万个,当然里面肯定有重复的。你也可以接着这4万个弄,可以获得200X200X200=800万个。这时候本程序的user_id就不能手输了,需要从文件读取,加快速度。
from weibo-follow.
这是官方限制的,最多200个
原来如此。感谢大佬的回复。
我发现好像加了认证有V的,在weibo.cn页面下面最多显示翻页 20页。
而普通用户则显示有50 100 的
互相关注了的微博,则全部都能看到,关注几千人都会全显示
from weibo-follow.
from weibo-follow.
感谢反馈。
普通用户说的是非加V用户吗,我刚刚试了下,不知道是不是操作不对,发现普通用户最多也是20页
from weibo-follow.
您好,我这里没有有效的cookie(严格按照要求获取cookie了但是依然无效),所以看到的人方便提供给我一份userid_list吗? 微信号:er847339327
from weibo-follow.
Related Issues (20)
- 某些用户(签约自媒体)用户ID抓取不到,抓取的是字符串,和昵称不同 HOT 1
- 想要随机获取列表中的x个人 HOT 1
- 请问我的weibo-follow一直无法安装是怎么回事? HOT 13
- 20页后面就没了😂 HOT 1
- 问题:“cookie无效或提供的user_id无效” HOT 2
- 把代码放在阿里云服务器上报错,但是在本地是可以运行的(由于是小白不太懂怎么弄,还希望作者大大帮助) HOT 1
- 可以增加一个根据这个爬取到的结果进行批量关注的功能吗? HOT 1
- 概率出现"Max retries exceeded with url:XXXX"的错误 HOT 3
- 页面限制 HOT 1
- 请问把sleep()的间隔秒数调短一些是否有被封ip的风险呢? HOT 5
- 请问出现is_exist = info[0].xpath("div/span[@class='ctt']") IndexError: list index out of range是因为什么 HOT 4
- 运行了停不下来 HOT 2
- 请问大佬,有没有爬取微博转发路径的功能? HOT 3
- 请问大佬,运行之后,没反应是怎么回事? HOT 2
- “cookie无效或提供的user_id无效”问题 HOT 5
- 想问一下作者,爬取了用户的关注列表以后,所有的关注用户都在user_id_list.txt里面,怎么能划分出来他们是那些用户的关注列表呢? HOT 2
- 59行偶尔报错 HOT 3
- 你好,出现xpath问题 HOT 2
- 想要爬取关注关系 HOT 3
- 依赖安装失败 HOT 1
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-follow.