how do i get python's mechanize to stop following meta refresh redirects?
I have a script which gets a webpage with a meta refresh. I need to parse the retrieved page but mechanize seems to follow the redirect. How do I get it to stop foll开发者_运维知识库owing it?
You can simply disable it
import mechanize
browser = mechanize.Browser()
browser.set_handle_refresh(False)
精彩评论