'how to save credentials from selenium webdriver into the console - for reuse

This may be dummy question but I'm having hard time with this one.

I have a python script that log in into some website.

after the login, I can see and scrap the site which has been done pretty easily..

This site I log on to, holding download links, these links can be downloaded only if u have the right certificates (if you are logged in).

when I use the selenium webdriver, it can download the links (because it logged into the site and holds the right certificate) but the problem is I don't want it to be downloaded in the webdriver, I want it to be downloaded in the script it self so I could do some work with it.

do note that getting the file from the container folder is not an option for me, these files should be only downloaded in the python script.

when I transfer the download link to request lib it throw the following error:

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'THEURL .'>(_ssl.c:1131)

which is fully understandably because the certificate is in the webdriver.. I couldn't find any way to transfer it to the script it self..



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source