RE: [wwwsearch-general] (no subject)



On Fri, 29 Aug 2008, bruce wrote:

Hi john.

Thanks for your reply. I tried your suggestion of using RobustFactory, and
still get a badly maligned html back!!! The html is listed below. I would

That's expected -- this affects the parsing of the HTML. It does not modify the HTML.


have thought that the mech process, would have interpreted the
"http-equiv="refresh" Unfortunately, mechanize apparently isn't able to
handle a "<meta http-equiv="refresh" url="/foo/..."> when it's inside the
<body> of the html...

Yes, only the head element is read (albeit with a slightly fuzzy definition of "head element").

In a theoretical future unstable branch, that might change, but currently mechanize doesn't try all that hard to work well with bad HTML.

Currently, you have to work around this kind of issue. You can perform the refresh manually, or modify the HTML and call .set_response(), or replace the HTTPEquivProcessor with your own (you could use HTTPEquivProcessor itself -- you can pass a parser factory function to its constructor).


John

.



Relevant Pages

  • Re: Line break in Visio 2003 / HTML export
    ... Yes, you can modify any of the pages, html, js, xml, whatever you want. ... > breaks in Visio. ... > Andy Howe wrote: ...
    (microsoft.public.visio)
  • Re: thousands of pages added automatically
    ... >document as a web page and then reload the html back into ... >>In certain spots in the document when I add, ... >>modify, Word automatically adds thousands of pages. ...
    (microsoft.public.word.formatting.longdocs)
  • web bug elimination
    ... What I want is an Outlook addin that will look at all incoming ... messages and modify any html to prevent downloading ... I know about Spampal with the html plug-in but I don't think ... is available so I can't modify it myself.. ...
    (microsoft.public.outlook.general)
  • Re: FrontPage Cell Padding
    ... I want to modify a SINGLE CELL, ... padding-left: and padding-right:? ... Unfortunately I did not want to modify HTML at ...
    (microsoft.public.frontpage.client)
  • Re: a PHP Confession:
    ... :album looks like. ... I need to know how to modify the code that generates ... Well, if you're only doing these for you own use, the html is pretty ... the pictures with straight CSS positioning or CSS plus tables, ...
    (comp.lang.php)