BeautifulSoup Error in Python 3.3

Nekses

New Member
I'm just trying to parse this site and I keep getting errors using BeautifulSoup. Can someone help me and identify the problem?\[code\]import urllibimport urllib.requestimport beautifulsouphtml = urllib.request.urlopen('http://yugioh.wikia.com/wiki/Card_Tips:Blue-Eyes_White_Dragon').read()soup = beautifulsoup.bs4(html)texts = soup.findAll(text=True)def visible(element): if element.parent.name in ['style', 'script', '[document]', 'head', 'title']: return False elif re.match('<!--.*-->', str(element)): return False return Truevisible_texts = filter(visible, texts)\[/code\]
 
Back
Top