如何在python中读取url并检查HTTPS?
如何在python中读取URL并检查HTTPS如何在python中读取url并检查HTTPS?,python,python-3.x,numpy,security,https,Python,Python 3.x,Numpy,Security,Https,如何在python中读取URL并检查HTTPS import urllib2 response = urllib2.urlopen('https://www.google.com/') html = response.read() 请尝试以下操作: import urllib.request response = urllib.request.urlopen('https://www.google.com/') html = response.read() print(html) 即使出现
import urllib2
response = urllib2.urlopen('https://www.google.com/')
html = response.read()
请尝试以下操作:
import urllib.request
response = urllib.request.urlopen('https://www.google.com/')
html = response.read()
print(html)
即使出现给定错误,请尝试安装以下代码并重试上述代码:
pip install urllib3