- 博客(1)
- 收藏
- 关注
原创 python3中from urllib import request与import urllib.request的区别
它包含了几个模块:用于打开及读写的urls的request模块、由request模块引起异常的error模块、用于解析urls的parse模块、用于响应处理的response模块、分析robots.txt文件的robotparser模块。例如使用from urllib import request时,请求头就写request.Request就好,使用import urllib.request时,请求头需要写成urllib.request.Request。
2024-02-06 10:37:04 300
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人