re
urllib
getHtml(url): page = urllib.urlopen(url)
html = page.read()
html
getImg(html): imgre = re.compile()
imglist = re.findall(imgre, html)
imglist
x = imgurl imglist:
f=((x)+,)
red=urllib.urlopen(imgurl)
buf=red.read()
f.write(buf)
x+=html = getHtml()结果总是:C:\python2.7.10\python.exe "H:\PyCharm Community Edition 2016.1.4\helpers\pydev\pydevd.py" --multiproc --qt-support --client 127.0.0.1 --port 64449 --file "H:/pycharm project/python-scrapy-imag.py"pydev debugger: process 23108 is connectingConnected to pydev debugger (build 145.1504)Process finished with exit code 0
添加回答
举报
0/150
提交
取消