python3 http请求获取url内容
import urllib.request def get_page(url): res = urllib.request.urlopen(url) content = res.read().decode() return content str1 = get_page(
import urllib.request def get_page(url): res = urllib.request.urlopen(url) content = res.read().decode() return content str1 = get_page(
#!/usr/bin/python3 import time # 格式化成2016-03-20 11:45:39形式 print (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())) # 格式化成Sat Mar 28 22:24:24 2
不多说,show me the code!!!def sendMail(): my_sender='xxx@qq.com' # 发件人邮箱账号 my_pass = 'xxxxx' # 发件人邮箱密码 my_user='xxx@qq.com'
当使用requests.get获取https链接时,提示如下错误:ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer