我正在尝试用 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。