猿问

在pycharm5.0中运行一个爬虫或抓取网页图片的简单测试程序一直显示空,没结果没错误是为什么,望解答

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 connecting

Connected to pydev debugger (build 145.1504)

Process finished with exit code 0


qq_后青春的诗_1
浏览 5851回答 2
2回答

飞翔32993

抱歉,我才刚刚开始学习python还没有学的这么深入呢
随时随地看视频慕课网APP

相关分类

Python
我要回答