摘要: 前言批量下载网页上的图片需要三个步骤:获取网页的URL获取网页上图片的URL下载图片例子from html.parser import HTMLParserimport urllib.requestimport os,uuid,sys#第1步:class PageLinkParser(HTMLParser): def __init__(self,strict=False): HTMLParser.__init__(self,strict) self.all=[] def handle_starttag(self,tag,attrs): if tag=='a': ... 阅读全文
posted @ 2013-08-17 13:43 zhizhou 阅读(2880) 评论(5) 推荐(5) 编辑