Using Selenium with an existing session and sign in details

12 Views Asked by At

I am trying to scrape a website that has a paywall, but I have a subscription. I have set something up to log in manually, but then I come to a 'confirm not a robot' screen and I can't get any further. Is there any way to use Selenium so that it opens in my current open browser, using the same session, as my log in information is already stored within this, so I log in automatically.

This is what I am currently doing and it opens a new browser window and I am not automatically logged in.

from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.keys import Keys
import time

PATH = 'C:\Program Files (x86)\chromedriver.exe'
driver = webdriver.Chrome(PATH)

driver.get(URL)

Any other advice on scraping data that is behind a paywall to which I am already subscribed would also be helpful. Thanks!

0

There are 0 best solutions below