HTMLParseError: EOF in middle of construct error

Diez B. Roggisch deets at nospam.web.de
Thu May 4 08:31:38 EDT 2006


Mike wrote:

> 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



More information about the Python-list mailing list