通过BeautifulSoup我们很容易的分析网页上的html信息,这段python代码用于输出网页上的所有超级链接
from BeautifulSoup import BeautifulSoup import urllib2 url = urllib2.urlopen("http://www.75271.com") content = url.read() soup = BeautifulSoup(content) links = soup.findAll("a")
通过BeautifulSoup我们很容易的分析网页上的html信息,这段python代码用于输出网页上的所有超级链接
from BeautifulSoup import BeautifulSoup import urllib2 url = urllib2.urlopen("http://www.75271.com") content = url.read() soup = BeautifulSoup(content) links = soup.findAll("a")