You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
是说要按时间顺序,先爬最早发布的再爬第二早发布的,以此类推,最后爬最新的微博吗?
如果是这样,思路大致这样: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)即可。
No description provided.
The text was updated successfully, but these errors were encountered: