Urllib2可以处理到同一网址的多个连接吗?

时间:2019-07-04 12:09:48

标签: python

我想知道Urllib2是否可以处理到同一服务器的多个连接,如果需要进一步的解释,请告诉我

#!/usr/bin/python
import urllib2
Server = urllib2.urlopen('https://www.google.com')
File = '/Download.txt'
URL = Server + File
if URL.getcode() == 200:
    Response = urllib2.urlopen(Server)
    Write = open(file, "w")
    Write.write(response.read())
    Write.close()
else:
    print (' Just Testing')

我从https://www.pythonforbeginners.com/python-on-the-web/how-to-use-urllib2-in-python/借来了下载代码

0 个答案:

没有答案