1. 程式人生 > >python requests模組https請求免證書設定

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