Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Python selenium gets stuck on site loading screen

First of all, this is the website I use.

The code block I used:

from selenium import webdriver
browserProfile = webdriver.ChromeOptions()
browserProfile.add_argument("start-maximized")
browserProfile.add_argument('--disable-blink-features=AutomationControlled')
browserProfile.add_argument('--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36')
browserProfile.add_experimental_option("excludeSwitches", ["enable-automation"])
browserProfile.add_experimental_option('useAutomationExtension', False)
browser = webdriver.Chrome("chromedriver.exe", chrome_options=browserProfile)
browser.get('https://www.gamermarkt.com')

ChromeDriver image:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

stays on this screen.

I think there is a bot block on the site, but I have no idea how to bypass it.

>Solution :

I would suggest you explore the following code:

import time
time.sleep(1) #sleep for 1 sec
time.sleep(0.25) #sleep for 250 milliseconds
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading