1

I'm trying to make a bot to automaticly use Google Play Gift Card on accounts. But I can't login. When I run my code Google says this browser is not secure. I tried using chromedriver and geckcodriver but didn't change anything. I tried using webbot instead of selenium but results are still the same. I even tried to open selenium webdriver and do everything manually but still gives the same error.

from selenium import webdriver

driver = webdriver.Chrome()
driver.get("https://google.com")
driver.find_element_by_xpath('//*[@id="gb_70"]').click() #hit login button
driver.find_element_by_xpath('//*[@id="identifierId"]').send_keys("username") #type username
driver.find_element_by_xpath('//*[contains(text(), "İleri")]').click() #hit next(my language is different so İleri instead of Next)
enes3626
  • 47
  • 6
  • Does this answer your question? [“This browser or app may not be secure” error while attempting to login in to Gmail account using GeckoDriver Firefox through Selenium and Python](https://stackoverflow.com/questions/59515561/this-browser-or-app-may-not-be-secure-error-while-attempting-to-login-in-to-gm) – questioning Nov 29 '21 at 10:40

2 Answers2

4

UPDATE: As of January 2021, this no longer works.

I know this is a late answer, but this is not impossible to do.

The following link comes from the Google OAuth playground.

https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount?redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground&prompt=consent&response_type=code&client_id=407408718192.apps.googleusercontent.com&scope=email&access_type=offline&flowName=GeneralOAuthFlow

You can use that link (ie. driver.get()) to log into your Google account.

This bypasses the automation checks allows you to log into Google using Selenium. At least for now.

UPDATE: As of January 2021, this no longer works.

idontknow
  • 438
  • 5
  • 16
  • I used this code, am i doing it correct? from selenium import webdriver driver = webdriver.Chrome() driver.get("https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount?redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground&prompt=consent&response_type=code&client_id=407408718192.apps.googleusercontent.com&scope=email&access_type=offline&flowName=GeneralOAuthFlow") – user6133 Nov 22 '20 at 23:39
  • Why did I just get an upvote? This shouldn't have worked... – idontknow Mar 04 '21 at 15:48
-1

Whenever you enter google's login page it detects that your browser has some functions enabled that normal browser does not have. It makes logging to the google services through selenium webdriver almost impossible.

Aleksander Ikleiw
  • 2,549
  • 1
  • 8
  • 26