开发者

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜