Python - Submit Information on a Website to Extract Data from Resulting Page
Posted
by
bloodstorm17
on Stack Overflow
See other posts from Stack Overflow
or by bloodstorm17
Published on 2013-10-27T03:50:54Z
Indexed on
2013/10/27
3:53 UTC
Read the original article
Hit count: 85
So I am trying to figure out how to post on a website that uses a drop down menu which is holding the values like this (based on the page source):
<td valign="top" align="right"><span class="emphasis">Select Item Option : </span></td>
<td align="left">
<span class="notranslate">
<select name="ItemOption1">
<option value="">Select Item Option</option>
<option value="321_cba">Item Option 1</option>
<option value="123_abcd">Item Option 2</option>
...
Now there are two of these drop down menus on top of each other. I want to be able to select an item from drop down menu 1 and drop down menu 2 and then submit the page. Now based on the code it submits the information using the following code:
<td colspan="2" align="center">
<input type="submit" value="View Result" onclick="return check()">
</td>
</tr>
</table>
<input type="hidden" name="ItemOption1" value="">
<input type="hidden" name="ItemOption2" value="">
I have no idea how to select the items in the drop down menu and then submit the page and capture the information on the resulting page into a text file. Can someone please help me with this?
© Stack Overflow or respective owner