Detecting BeautifulSoup freeze

Bug #1295155 reported by Karthik Venkateswaran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Beautiful Soup
New
Undecided
Unassigned

Bug Description

Parsing the following site using beautifulsoup with html5lib parser hangs but the same works well with html.parser

Site: http://www.webmasterworld.com/google/3584866.htm

#contents is fetched via urllib2
soup = BeautifulSoup(contents, 'html5lib')

soup('a') hangs

but the following works just fine

soup = BeautifulSoup(contents1, 'html.parser')

soup('a')
> [.....]

Is there something wrong with what i am doing or is there a way to detect if soup will fail before making the call to soup('a')

Pastebin reference:
http://paste.ubuntu.com/7125462/

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.