首页 > 代码库 > python写的简单有效的爬虫代码

python写的简单有效的爬虫代码

python写的简单有效的爬虫代码

by 伍雪颖

import re
import urllib
                                 
def getHtml(url):
        html = urllib.urlopen(url)
        scode = html.read()
        return scode
                                 
def getImage(source):
        reg = r'src=http://www.mamicode.com/"(.*?\.jpg)"'>