HTMLParseError: EOF in middle of construct error

M

Mike

Me again.

I'm getting this error when parsing an external URL - I understand that
a common cause of this is badly formed HTML (or XHTML) and that's fair
enough, but is there any way to turn the parser into forgiving mode?

As I'm getting this error from documents over which I have no control,
I need to be able to recover from this situation. Is there a way to
clean the document before parsing it, or have the parser ignore the
issue and proceed (which would probably be ok in my case)?

Mike
 
D

Diez B. Roggisch

Mike said:
Me again.

I'm getting this error when parsing an external URL - I understand that
a common cause of this is badly formed HTML (or XHTML) and that's fair
enough, but is there any way to turn the parser into forgiving mode?

As I'm getting this error from documents over which I have no control,
I need to be able to recover from this situation. Is there a way to
clean the document before parsing it, or have the parser ignore the
issue and proceed (which would probably be ok in my case)?

google:BeatifulSoup

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top