jpjacobpadilla / Google-Colab-Selenium

The best way to use Selenium in Google Colab Notebooks!
https://pypi.org/project/google-colab-selenium/
MIT License
148 stars 16 forks source link

Google is able to detect the Undetectable version #11

Closed abhishek-seo closed 1 month ago

abhishek-seo commented 1 month ago

Hi. I am trying to login to Gmail using this package but Google can detect the bot.

Here is my code -

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time
from seleniumbase import Driver
import random
import pandas as pd
from IPython.core.display import display, HTML
import pygsheets
import google_colab_selenium as gs
from selenium.webdriver.chrome.options import Options

driver = gs.UndetectedChrome()

Then I have written a function to enter email and password which works with undetected chrome locally but does not work on Google colab and I can see this -

image

Any solution? Thanks

jpjacobpadilla commented 1 month ago

Hi, This may have something to do with running Undetected-Chromedriver in headless vs non-headless mode or the IP address of the Google Colab Notebook. Does This program work on your computer when you set Undetected-Chromedriver to "headless"?