Code Monkey home page Code Monkey logo

Comments (7)

dataabc avatar dataabc commented on June 14, 2024

已经修改代码,现在是获取用户的信息并写入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.

barnett2010 avatar barnett2010 commented on June 14, 2024

已经修改代码,现在是获取用户的信息并写入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.

dataabc avatar dataabc commented on June 14, 2024

这是官方限制的,最多200个。如果你想获得更多user_id,可以利用这200个user_id,每个id都可以获取200个,200个id就可以获取4万个,当然里面肯定有重复的。你也可以接着这4万个弄,可以获得200X200X200=800万个。这时候本程序的user_id就不能手输了,需要从文件读取,加快速度。

from weibo-follow.

barnett2010 avatar barnett2010 commented on June 14, 2024

这是官方限制的,最多200个

原来如此。感谢大佬的回复。

我发现好像加了认证有V的,在weibo.cn页面下面最多显示翻页 20页。
而普通用户则显示有50 100 的
互相关注了的微博,则全部都能看到,关注几千人都会全显示

from weibo-follow.

barnett2010 avatar barnett2010 commented on June 14, 2024

ScreenShot02493.jpg

ScreenShot02492.jpg

from weibo-follow.

dataabc avatar dataabc commented on June 14, 2024

感谢反馈。

普通用户说的是非加V用户吗,我刚刚试了下,不知道是不是操作不对,发现普通用户最多也是20页

from weibo-follow.

PhoebusSi avatar PhoebusSi commented on June 14, 2024

您好,我这里没有有效的cookie(严格按照要求获取cookie了但是依然无效),所以看到的人方便提供给我一份userid_list吗? 微信号:er847339327

from weibo-follow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.