HTMLParseError: EOF in middle of construct error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    #1

    HTMLParseError: EOF in middle of construct error

    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

  • Diez B. Roggisch

    #2
    Re: HTMLParseError: EOF in middle of construct error

    Mike wrote:
    [color=blue]
    > 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)?[/color]

    google:Beatiful Soup

    Diez

    Comment

    • John J. Lee

      #3
      Re: HTMLParseError: EOF in middle of construct error

      "Diez B. Roggisch" <deets@nospam.w eb.de> writes:
      [...][color=blue]
      > google:Beatiful Soup[/color]

      Even better, google for BeautifulSoup
      ^

      John

      Comment

      Working...