随笔分类 - 爬虫采集
摘要:最近在学习用Python采集,接触到BeautifulSoup。BeautifulSoup是用 Python 写的一个 HTML/XML 的解析器,它可以很好的处理不规范标记并生成剖析树。from BeautifulSoup import BeautifulSoupfrom BeautifulSoup import BeautifulStoneSoup import urllib2url=“xxxxxxxxxxxxxx”content = urllib2.urlopen(url).read()soup = BeautifulSoup(content,fromEncoding="gb1
阅读全文


浙公网安备 33010602011771号