python requests模块https请求免证书设置

上代码

#!usr/bin/python
# -*- coding: utf-8 -*-

from bs4 import BeautifulSoup
import requests
import sys
reload(sys)
sys.setdefaultencoding('utf-8')

url = "https://www.shiyanlou.com/courses/?category=all&course_type=all"
response = requests.get(url, verify=False)
html = BeautifulSoup(response.text, "html.parser")
print '---------接收信息---------'
print html

 

你可能感兴趣的:(Python)