我正在跟踪这个guide of requests-html库,并在笔记本电脑中发现了此错误。
在Javascipt支持中,我尝试像这样的页面进行编码:
from requests_html import HTMLSession
session = HTMLSession()
r = session.get('http://python-requests.org/')
r.html.render()
print(r.text)
运行此代码时,我以Sublimetext收到了以下内容:
[W:pyppeteer.chromium_downloader]开始下载Chrome。 下载可能需要几分钟。 OpenSSL.SSL.Error:[('SSL例程','tls_process_server_certificate','证书验证失败')]
请问有人可以帮我解决这个问题吗?
答案 0 :(得分:1)
我用以下方法解决问题:
pip install pyppdf
然后在代码中首先使用:
import pyppdf.patch_pyppeteer
来源:https://github.com/miyakogi/pyppeteer/issues/258#issuecomment-563075764