0

I try to login to tiktok website (https://www.tiktok.com/login/phone-or-email/email) with selenium but it returns an error everytime i try to access the url

driver.get('https://www.tiktok.com/login/phone-or-email/email')

This is the error :

raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=55149): Max retries exceeded with url: /session/2e62502691df0a989ce9cce66e48fac6/url (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x03B5EA70>: Failed to establish a new connection: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée'))

I tried to use different proxy at every login like in this question How to rotate Selenium webrowser IP address but it didn't work. I also tried to implement selenium-stealth (https://github.com/diprajpatra/selenium-stealth#usage) but it changed anything. I also added those chromeOptions : `

options.add_experimental_option('prefs', prefs)
options.add_argument("start-maximized")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_argument('==disable-blink-features=AutomationControlled')
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
options.add_argument("==profile-directory=Default")
options.add_argument("==user-data-dir=C:/Users/Admin/AppData/Local/Google/Chrome/User Data")
options.add_argument("start-maximized")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)

` but anything worked

Ahmed
  • 1
  • 3

0 Answers0