Git Product home page Git Product logo

Comments (4)

dataabc avatar dataabc commented on June 6, 2024

可以参考这个https://github.com/dataabc/weibo-follow,此程序是获取给定user_id用户关注列表中多个用户的user_id,然后再获取对应的微博。爬用户粉丝的思路差不多,可以仿照这个方式获取粉丝信息。不过因为限制,一个用户好像最多只能爬200个关注和粉丝。

from weibo-crawler.

Nathern001 avatar Nathern001 commented on June 6, 2024

好的,谢谢。还有个问题,我现在有了一份id文件,但是不能保证里面的id都正确,我要怎么修改代码直接跳过不正确的id而不是报错停下来啊?

from weibo-crawler.

dataabc avatar dataabc commented on June 6, 2024

修改两个方法,get_page_count和get_pages,把get_page_count中的sys.exit去掉,你可以换成print之类的打印出错信息;给get_pages方法加上try ..except...语句,原来的代码都放到try里。这样就可以了

from weibo-crawler.

Nathern001 avatar Nathern001 commented on June 6, 2024

好的,已经可以了,感谢!

from weibo-crawler.

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.