|
timeout是请求超时时间 ;data当要以POST方式使用时就要传入,用GET方式使用时是None;context(环境,上下文) 与HTTPSConnettion有关?;cafile需要指定一组CA证书的文件夹,capath指定一个散列证书的目录More information can be found in ssl.SSLContext.load_verify_locations().;这个response = urllib.request.urlopen()的对象response有以下的方法:response.geturl() 返回网址url 通常用于是否确定要循环定向;response.info() 返回一些信息例如headersresponse.getcode() 返回响应的HTTP状态码urllib.request.urlopen() 相当于旧版的 urllib2.urlopen
小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)
GMT+8, 2024-3-29 18:11
Powered by Discuz! X3.4
© 2001-2023 Discuz! Team.