Problem.
I have a real html page, which could be parsed by beautifulsoup (or something else) if needed.
I have some identical input tags on this page. Say, a 1000 input tags that look like:

<input class=​"text_class​" type=​"text" size=​"3" value=​"20">​

And on the end of the page I have submit-type input tag that looks like this:

<input class=​"submit_class" type=​"submit" value=​"Submit">​

The question is how could I change the values of my 1000 tags to be, lets say, 30, not 20 and submit all the changes using final submit-tag. All I need is a human-like behavior on the page on a big amount of data performed by python script. I suspect that maybe some special python library would be helpful in this case.
Thanks in advance for any help or pointing directions to look at!

有帮助吗?

解决方案

You have several options to change the input values and submit a form:

Note that Selenium and Ghost.py use a real browser. Mechanize is the easiest way to go in your case, just note that it may not work for you if there is a lot of javascript involved in the form initializing or submitting process.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top