为了账号安全,请及时绑定邮箱和手机立即绑定

爬虫的时候下载图片出问题了,下载了后不能打开

# -*- coding: utf-8 -*-
import re
import requests
import urllib
html=requests.get('http://www.360doc.com/content/13/0509/15/7436612_284146326.shtml')
html.encoding="utf-8"

title=re.findall('src="'"(.*?)"'" __1368084481640__="ev_',html.text)
i=0

for each in title:
   print each
   urllib.urlretrieve(each,'%s.jpg'%i)
   i+=1

正在回答

举报

0/150
提交
取消
Python开发简单爬虫
  • 参与学习       227586    人
  • 解答问题       1288    个

本教程带您解开python爬虫这门神奇技术的面纱

进入课程

爬虫的时候下载图片出问题了,下载了后不能打开

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号