[Tutor] posting with urllib2

Benjamin Fishbein bfishbein79 at gmail.com
Tue Oct 2 23:27:15 CEST 2012

Hi. I'm really confused about which data I need to put in for posting something with urllib2.
I added the action on to the website. I know that I use that for the URL parameter. But what do I need to put in dicts to pass along data? And what is the purpose of the third parameter...the delay??

<div class="actions_form">
  <form method="post" name="product_list" action="/sys/obb/customer/process.cgi">
    <h4 style="margin-bottom: 0px; padding-bottom: 2px;">Enter UPC here:</h4>
    <textarea style="margin-bottom: 5px;" name="upc_list" id="upc_list" rows=10 cols=20></textarea><br />
<input type="hidden" name="bid_id" value="9368172">
    <input type="submit" name="add_products" value="add products" title="add products" class="whitebutton" onClick="return isbnsearch();">
<br /><br />
    <a href="/sys/obb/customer/process.cgi?clear_bid=Clear%20Bid" title="start over" class="whitebutton">start over</a>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121002/02f5afa9/attachment-0001.html>

More information about the Tutor mailing list