/ Published in: Python
I see almost all GET, so this is handy to have around
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/python import urllib,urllib2 url = 'http://www.commentcamarche.net/search/search.php3' parameters = {'Mot' : 'Gimp'} data = urllib.urlencode(parameters) # Use urllib to encode the parameters request = urllib2.Request(url, data) response = urllib2.urlopen(request) # This request is sent in HTTP POST page = response.read(200000)