Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript rendering error (pyppeteer.errors.PageError: net::ERR_CERT_SYMANTEC_LEGACY) #174

Closed
cquark7 opened this issue May 3, 2018 · 6 comments

Comments

@cquark7
Copy link

cquark7 commented May 3, 2018

I am using requests-html library to render JavaScript on a webpage, but I received this error:
pyppeteer.errors.PageError: net::ERR_CERT_SYMANTEC_LEGACY

Traceback (most recent call last):

    File "F:/Users/user/scripts/test.py", line 24, in <module>
        page = page.html.render()

    File "F:\Miniconda\lib\site-packages\requests_html.py", line 583, in render
        content, result, page = self.session.loop.run_until_complete(_async_render(url=self.url, script=script, sleep=sleep, wait=wait, content=self.html, reload=reload, scrolldown=scrolldown, timeout=timeout, keep_page=keep_page))

    File "F:\Miniconda\lib\asyncio\base_events.py", line 466, in run_until_complete
        return future.result()

    File "F:\Miniconda\lib\site-packages\requests_html.py", line 545, in _async_render
        await page.goto(url, options={'timeout': int(timeout * 1000)})

    File "F:\Miniconda\lib\site-packages\pyppeteer\page.py", line 644, in goto
        raise PageError(result)

pyppeteer.errors.PageError: net::ERR_CERT_SYMANTEC_LEGACY

How can I fix this error in requests-html?

@cquark7
Copy link
Author

cquark7 commented May 4, 2018

When I open the same website normally using Google Chrome it shows "privacy error". In order to access the site I have to click on "advanced" and then "proceed anyway".
This answer https://superuser.com/a/1036062 describes how a developer can disable such errors in Chrome/Chromium, but I don't know how to do it using requests-html

@L1ghtn1ng
Copy link

@cquark7 The issue is the ssl cert is not valid, in requests lib there is a verify= param to toggle the ssl check so use that and you should be good

@0xmayday
Copy link

the issue with calling .render is that it uses pyppeteer to make the request, which bypasses the verify=False, so you'll see certificate errors when trying to call render. There is an ignoreHTTPSErrors bool argument in pyppeteer, but I can't figure out how to force that within requests-html...

@oldani
Copy link
Member

oldani commented Feb 19, 2019

Hi @DavidMay121

On the last version released yesterday, you can just pass verify=False when initializing your session.

@oldani oldani closed this as completed Feb 19, 2019
@CayoM
Copy link

CayoM commented Apr 16, 2020

this doesnt seem to be working anymore. The parameter seem to be ignored and there is nothing about this parameter in the official documentation. Any news on this?

@isobarbaric
Copy link

I agree with ^, this doesn't seem to be a thing anymore. There isn't any mention of the verify parameter in the docs either. Are there any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants