如果你只是问谷歌,你将得到至少两个答案.
http://docs.python.org/library/httplib.html
http://docs.python.org/library/urllib.html
好的介绍也是从Dive到Python 第11章的一章.HTTP Web服务
您可以通过HTTP协议客户端访问网站:httplib
虽然也许你喜欢urllib2,具体来说就是urllib2.urlopen
这是关于使用urllib2的小例子:
import urllib2
page = urllib2.urlopen("http://example.com/").read()
print page
Run Code Online (Sandbox Code Playgroud)