Skip to content

Commit

Permalink
feat: Update TokenRetriever to use ChromeOptions to bypass ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
Loukious committed Aug 9, 2024
1 parent 8b4dd53 commit 5c9bb34
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion TokenRetriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ def load_cookies(self, driver):
driver.add_cookie(cookie)

def retrieve_token(self):
self.driver = uc.Chrome()
chrome_options = uc.ChromeOptions()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument("--ignore-certificate-errors") # Ignore SSL certificate errors
chrome_options.add_argument("--disable-web-security") # Disable web security
chrome_options.add_argument("--allow-running-insecure-content") # Allow insecure content

self.driver = uc.Chrome(options=chrome_options)
self.driver.get("https://www.tiktok.com") # Load a page first before setting cookies
self.load_cookies(self.driver)
self.driver.get(self.streamlabs_auth_url)
Expand Down

0 comments on commit 5c9bb34

Please sign in to comment.