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:

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

Leave a Reply