爬虫 海贼王漫画 帮我看看错误 大神们

weixin_45014515 2019-07-02 11:57:51
import requests list = ['a','b','c','d','e','f','g','h','j','k','l','m','n','o'] print(list[1]) url = 'https://prod-api.ishuhui.com/comics/detail?id=11495' headers = {'user-agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'} res = requests.get(url , headers = headers ) pic = res.json() pic1 = pic['data']['contentImg'] i = 0 while i < 13: url_0 = pic1[i]['url'] res1 = requests.get(url_0) #print(type(p)) list[i] = res1.content print(type(list[i])) s = open('list[i].png','wb') s.write(list[i]) i = i+1 s.close() 为什么最后只能怕到一页 而不是12页
...全文
51 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

3,055

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC HTML/XML
社区管理员
  • HTML/XML社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧