【发布时间】:2013-09-28 18:28:05
【问题描述】:
我正在尝试使用 BeautifulSoup 创建一个表格抓取。我写了这段 Python 代码:
import urllib2
from bs4 import BeautifulSoup
url = "http://dofollow.netsons.org/table1.htm" # change to whatever your url is
page = urllib2.urlopen(url).read()
soup = BeautifulSoup(page)
for i in soup.find_all('form'):
print i.attrs['class']
我需要抓取 Nome、Cognome、Email。
【问题讨论】:
标签: python html web-scraping beautifulsoup html-parsing