0

I started working with Selenium, it works for any website I tried except one (myvisit.com) that doesn't load the page.
It opens Chrome but the page is empty. I tried to set number of delays but it still doesn't load.
When I go to the website on a regular Chrome (without Selenium) it loads everything.

Here is my simple code, not sure how to continue from that:

import os
import random
import time

# selenium libraries
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import ChromiumOptions


def delay():
    time.sleep(random.randint(2,3))

driver = webdriver.Chrome(os.getcwd()+"\\webdriver\\chromedriver.exe")

driver.get("https://myvisit.com")

delay()
delay()
delay()
delay()

I also tried to use ChromiumOptions with flags like --no-sandbox but it didn't help:

2
  • What's the url? Commented Nov 18, 2022 at 10:14
  • I wrote it in the code: myvisit.com Commented Nov 18, 2022 at 10:15

1 Answer 1

1
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument('--disable-blink-features=AutomationControlled')
driver = webdriver.Chrome(os.getcwd()+"\\webdriver\\chromedriver.exe",options=options)

Simply add the argument to remove it from determining it's an automation.

Sign up to request clarification or add additional context in comments.

1 Comment

Cool, how did you knew that? I searched for something to point it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.