python3xxx / weibo_spider

爬取微博内评论,获取评论内容和图片信息
294 stars 109 forks source link

拿到图片的文件名,替换一下URL,可以获得高清大图的~ #2

Open jjn0703 opened 5 years ago

jjn0703 commented 5 years ago

例如://wx2.sinaimg.cn/thumb180/006CIwoely1g2ol25wd69j30u00u0jy9.jpg 拿到文件名:006CIwoely1g2ol25wd69j30u00u0jy9.jpg,大概是md5编码过的, 然后拼接URL,得到:http://wx3.sinaimg.cn/large/006CIwoely1g2ol25wd69j30u00u0jy9.jpg 就是高清大图的链接~

liuwenhaha commented 5 years ago

例如://wx2.sinaimg.cn/thumb180/006CIwoely1g2ol25wd69j30u00u0jy9.jpg 拿到文件名:006CIwoely1g2ol25wd69j30u00u0jy9.jpg,大概是md5编码过的, 然后拼接URL,得到:http://wx3.sinaimg.cn/large/006CIwoely1g2ol25wd69j30u00u0jy9.jpg 就是高清大图的链接~

你好啊,我运行到21页就报错了 weibo_comment.py的104行 max_id_json = html.xpath('//div[@node-type="comment_loading"]/@action-data')[0] 在爬到第21页时报错:IndexError: list index out of range 你运行有问题吗

python3xxx commented 5 years ago

多谢你的建议~