Question

I'm using Mechanize in Python to submit a form and view some info. The URL goes to some standard URL for the request, without the request parameters in it. Something like: xyzdomain.com/request

In the browser, it normal shows a loading icon, then displays the data. There is no change in the top of the page (header) so the full page is never reloaded, but the URL does change from /index to /request.

About 1/3 of the time, I get a httplib.IncompleteRead exception and I checked the partial HTML of the response and the page is saying "If it takes longer than 25 seconds, refresh the page."

So if I grabbed the current URL of the Mechanize Browser and used open() on it, would that have the same affect as using refresh (if Mechanize had refresh).

Était-ce utile?

La solution

Maybe this might help

br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)

For more: Meta Refresh

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top