Code Monkey home page Code Monkey logo

Comments (2)

dataabc avatar dataabc commented on May 22, 2024

是说要按时间顺序,先爬最早发布的再爬第二早发布的,以此类推,最后爬最新的微博吗?
如果是这样,思路大致这样:1.先爬最后一页微博,再爬倒是第二页,从后往前爬;2.对于每一页微博,先爬最后一条,再爬倒数第二条,以此类推。
get_weibo_info中的page用来控制爬取的页数,for page in range(1, page_num + 1)表示从第一页爬到最后一页,修改为for page in range(page_num , 0, -1);
for i in range(0, len(info) - 2)控制每页内从第一条爬到最后一条,修改为for i in range(len(info) - 3,-1, -1)即可。

from weibospider.

leqiang222 avatar leqiang222 commented on May 22, 2024

可以了,感谢🙂

from weibospider.

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.