python urllib.urlencode用法演示
>>> import urllib >>> params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) >>> f = urllib.urlopen("http://www.75271.com/cgi-bin/query?%s" % params) >>> print f.read()
python urllib.urlencode用法演示
>>> import urllib >>> params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) >>> f = urllib.urlopen("http://www.75271.com/cgi-bin/query?%s" % params) >>> print f.read()