目前python3的urllib2与urllib合并了,使用时需要使用
import urllib.request
使用教程:
打开
response = urllib.request.urlopen("网页地址")
转载自:
https://blog.csdn.net/qq_41915690/article/details/89338617
本文介绍了Python3中urllib库的变化,指出urllib2已与urllib合并。现在应当使用`urllib.request`来执行HTTP请求,例如通过`urllib.request.urlopen()`打开网页。详细步骤和示例代码帮助理解这一更新。
目前python3的urllib2与urllib合并了,使用时需要使用
import urllib.request
使用教程:
打开
response = urllib.request.urlopen("网页地址")
转载自:
https://blog.csdn.net/qq_41915690/article/details/89338617
1万+

被折叠的 条评论
为什么被折叠?