Python3.X如何下载安装urllib2包 ?

python 3.X版本不需要安装urllib2包,因为urllib和urllib2包集合成在一个包了

那现在问题是:

在python3.x版本中,如何使用:urllib2.urlopen()?

答:

import urllib.request

resp=urllib.request.urlopen("http://www.baidu.com")

原文地址:https://www.cnblogs.com/scios/p/8400764.html