#coding=utf-8 import urllib,urllib2 url = 'http://www.xxx.com' values = {'wd' : 'python', 'language' : 'Chinese' } data = urllib.urlencode(values) headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36' } req = urllib2.Request(url,data,headers) response = urllib2.urlopen(req) html = response.read()