Closed Lodour closed 2 years ago
考虑用以下api作为替换
URL
: http://photo.weibo.com/photos/get_all
params
: uid, album_id, count(30), page, type, __rnd
频繁使用该api易引起掉线
考虑用以下api作为替换
URL
: http://photo.weibo.com/photos/get_allparams
:uid, album_id, count(30), page, type, __rnd
能具体一点吗? params怎么改?
已经很具体了
替换后报错:
Traceback (most recent call last):
File "main.py", line 5, in <module>
Crawler(target).start()
File "C:\ClonedProjects\Weibo-Album-Crawler\weibo\core.py", line 56, in start
self.__download_album(album)
File "C:\ClonedProjects\Weibo-Album-Crawler\weibo\core.py", line 69, in __download_album
all_large_pics = self.__fetch_large_pics(album, all_photo_ids)
File "C:\ClonedProjects\Weibo-Album-Crawler\weibo\core.py", line 110, in __fetch_large_pics
for i in range(0, len(ids), chunk_size)
File "C:\ClonedProjects\Weibo-Album-Crawler\weibo\core.py", line 110, in <dictcomp>
for i in range(0, len(ids), chunk_size)
TypeError: unhashable type: 'slice'
No longer needed.
使用
http://photo.weibo.com/photos/get_photo_ids
获取相册所有图片id时,所能获得的图片为最新2000张