python通过urllib2发送post请求并抓取返回内容
#!/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)