Re: Truoble With A Search Script for ImageBin.org

2010-03-19 Thread Brandon C
*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
-- 
http://mail.python.org/mailman/listinfo/python-list


script to upload file using POST form

2010-03-19 Thread Brandon C
got another question for yall wonderful minds; how can i upload a file to a
server that uses a POST form?

here's the link to the form that i'd like to be able to upload a file:
http://imagebin.org/index.php?page=add

tks
-- 
http://mail.python.org/mailman/listinfo/python-list