python requests模块https请求免证书设置
上代码#!usr/bin/python# -*- coding: utf-8 -*-from bs4 import BeautifulSoupimport requestsimport sysreload(sys)sys.setdefaultencoding('utf-8')url = "https://www.shiyanlou.com/courses/?category...
·
上代码
#!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
更多推荐



所有评论(0)