Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16595

Site can't be reached after logging in through Selenium python

$
0
0

I'm trying to scrape log-in based website using selenium-python. When I click on login button, it shows me something like below in the image.

enter image description here

This is What I've tried so far:

driver = webdriver.Chrome()url = 'https://www.company.ai/account/login'driver.get(url)# driver.implicitly_wait(10)time.sleep(5)username = WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "input[name='username']")))username.send_keys("EMAIL_ADDRESS")password = WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "input[placeholder='Password']")))password.send_keys("PASSWORD")time.sleep(5)button = WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "button[type='submit']")))# driver.implicitly_wait(5)button.click()time.sleep(10)# Extract data from the dynamically loaded contentnewURL = 'url1.com'data = driver.get(newURL)driver.implicitly_wait(10)print(data.title)# driver.quit()

Any idea how to bypass this page?


Viewing all articles
Browse latest Browse all 16595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>