阅读背景:

python3 使用urllib报错urlopen error EOF occurred in violation of protocol (_ssl.c:841)

来源:互联网 

python3源码:

import urllib.request
from bs4 import BeautifulSoup

response = urllib.request.urlopen("https://php.net/")
html = response.read()
soup=BeautifulSoup(html, "html5lib")
text=soup.get_text(strip=True)
print(text)
import urllib.request
from bs4 import 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: