from BeautifulSoup import BeautifulSoup
from urllib2 import urlopen
def get_wotd():
return str((BeautifulSoup(urlopen('http://www.reference.com/wordoftheday'))).findAll('h2'))
print get_wotd()
(python) Parsing certain HTML output tags using beautiful soup
最新推荐文章于 2023-06-11 09:53:48 发布