import requests
from bs4 import BeautifulSoup
res = requests.get("https://www.ptt.cc/bbs/NBA/index4807.html", verify
= False)
soup = BeautifulSoup(res.text,"lxml")
soup
SSLError Traceback (most recent call
last)
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-
packages/requests/packages/urllib3/connectionpool.py in urlopen(self,
method, url, body, headers, retries, redirect, assert_same_host,
timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
我尝试输入“verify = False”,但似乎没用。
我使用了juypter并创建了python3项目来运行这段代码。我的python版本是2.7.13和3.4.3,但我只能使用juypter创建python3,而且我无法在2.7.13版本下导入“请求”。