import urllib
from BeautifulSoup import *
url = raw_input('Enter - ')
html = urllib.urlopen(url).read()
soup = BeautifulSoup(html)
# Retrieve all of the anchor tags
tags = soup('span')
for tag in tags:
# Look at the parts of a tag
#calculate whatever you wanto
您可以使用此示例代码。你知道吗
试试看:
相关问题 更多 >
编程相关推荐