Truoble With A Search Script for ImageBin.org

Brandon C brandonc530 at gmail.com
Fri Mar 19 17:10:54 EDT 2010


*grumble* *grumble* *grumble*

oops, sorry ... my mistake

it turns out that i misspelled one of the values and left another one out.
 here's the working script now for anyone who may care:

import urllib
import urllib2
url = 'http://imagebin.org/index.php?page=search'
values = {'search_for' : 'blah', 'field' : 'nickname', 'mode' : 'search'}
data = urllib.urlencode(values)
request = urllib2.Request(url, data)
response = urllib2.urlopen(request)
page = response.read()
print page

the value of 'field' is 'nickname, not 'Nickname';
and i left out the 'mode' one

tks for yalls help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100319/6ecc6ab1/attachment-0001.html>


More information about the Python-list mailing list