开发者

in mechanize, is there anyway of rewriting the url to POST to in a form?

开发者 https://www.devze.com 2023-01-15 15:51 出处:网络
I\'m running a python script and I\'m using mechanize. The form i\'m trying to submit normally uses javascript to rewrite the url to POST to, so to correctly submit the form i need to manually do the

I'm running a python script and I'm using mechanize. The form i'm trying to submit normally uses javascript to rewrite the url to POST to, so to correctly submit the form i need to manually do the same. is th开发者_StackOverflow中文版ere anyway of doing this?


Mechanize doesn't process Javascript. The best way usually is to use browser to process Javascript - if you prefer do it in Python use PythonExt.

Also you can try Selenium - seleniumhq.org. It's used for web-site testing but can send forms too.


you may test zope http://pypi.python.org/pypi?:action=display&name=zope.testbrowser

0

精彩评论

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

关注公众号