Python - 填写并提交HTML表单 [英] Python - Fill and submit a HTML Form
问题描述
我想用python在网页上填写并提交表单。我想与之交互的表单有几个下拉框,这些框用JavaScript填充。我查看了机械化库,但它不处理JavaScript。你可以建议一个替代的图书馆/方法与表单交互吗?
干杯,
Pete
-
Selenium RC或Windmill(http://www.getwindmill.com/)
-
检查表单的返回GET或POST值;
使用urllib2直接提交合成请求。
I would like to fill in and submit a form on a web page using python. The form I want to interact with has several drop down boxes which are filled using JavaScript. I have looked at the mechanize library but it doesn't handle JavaScript. Can you suggest an alternate library/method for interacting with the form?
Cheers,
Pete
Selenium RC or Windmill (http://www.getwindmill.com/)
Examine the form's returned GET or POST values; use urllib2 to submit synthesized requests directly.
这篇关于Python - 填写并提交HTML表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!