gologinapp / pygologin

REST API provides programmatic access to GoLogin App. Create a new browser profile, get a list of all browser profiles, add a browser profile and running
Other
65 stars 41 forks source link

Cannot run the gologin #39

Closed choseenonee closed 1 year ago

choseenonee commented 1 year ago

error removing profile C:\Users\okaym\AppData\Local\Temp\gologin_64bed9edc1d71d4a0afc28d1 uploadEmptyProfile createEmptyProfile Traceback (most recent call last): File "C:\Users\okaym\Desktop\seleniumextension\gologin.py", line 285, in downloadProfileZip self.extractProfileZip() File "C:\Users\okaym\Desktop\seleniumextension\gologin.py", line 312, in extractProfileZip zip_ref.extractall(self.profile_path)
File "C:\Users\okaym\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1634, in extractall self._extract_member(zipinfo, path, pwd) File "C:\Users\okaym\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1688, in _extract_member open(targetpath, "wb") as target: OSError: [Errno 22] Invalid argument: 'C:\Users\okaym\AppData\Local\Temp\gologin_64bed9edc1d71d4a0afc28d1\Default\Network\Cookies'

i am using selenium==4.0.0 with the following code:

from sys import platform from selenium import webdriver from selenium.webdriver.chrome.options import Options from gologin import GoLogin import time

gl = GoLogin({ 'token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NGJlOTAwZjE2ODg2MTZlOTVlMmJiZGYiLCJ0eXBlIjoiZGV2Iiwiand0aWQiOiI2NGJlOTBhOWMxZDcxZDZjYThkYjJlOGIifQ.N03IIvbpUx3hlTnHBpM78jWW2-2hBV64TJKAg97_49Q', 'profile_id': '64bed9edc1d71d4a0afc28d1', })

if platform == "linux" or platform == "linux2": chrome_driver_path = './chromedriver' elif platform == "darwin": chrome_driver_path = './mac/chromedriver' elif platform == "win32": chrome_driver_path = 'chromedriver.exe'

debugger_address = gl.start() chrome_options = Options() path = 'app.crx' chrome_options.add_extension(path) chrome_options.add_experimental_option("debuggerAddress", debugger_address) driver = webdriver.Chrome(executable_path=chrome_driver_path, options=chrome_options) url = 'chrome-extension://ojggmchlghnjlapmfbnjholfjkiidbch/home.html' driver.get(url) time.sleep(30) driver.quit()

stepjet commented 1 year ago

Hi! try to remove C:\Users\okaym\AppData\Local\Temp\gologin_64bed9edc1d71d4a0afc28d1 manually and restart your code

choseenonee commented 1 year ago

Hey! it worked for me! thank you!