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
Start Profile Not Running With Same Preference.. #26
this code is for create new profile and get return their id for opening it.. it create profile successfully with the same preference i want to in profile... and also save the profile on Gologin Software..
👇
from gologin import GoLogin
import random
from selenium import webdriver
import time
TOKEN = "token"
class CreateProfile:
def create_profile(self):
random_number = random.randrange(0, 1000)
gl = GoLogin({
"token": TOKEN,
})
self.profile_id = gl.create({
"name": f'window {random_number}',
"notes": "auto generated",
"os": "win",
"navigator": {
"language": 'en-US',
# Your userAgent (if you don't want to change, leave it at 'random')
"userAgent": 'random',
# Your resolution (if you want a random resolution - set it to 'random')
"resolution": 'random',
"platform": 'win32',
},
'proxy': {
'mode': 'none', # Specify 'none' if not using proxy
'autoProxyRegion': 'us'
# "host": '',
# "port": '',
# "username": '',
# "password": '',
},
"canvas": {
"mode": "off",
"noise": 0.68113761
},
"webGL": {
"mode": "off",
"getClientRectsNoise": 0,
"noise": 0
},
"webGLMetadata": {
"mode": "mask",
"vendor": "Google Inc. (NVIDIA)",
"renderer": "ANGLE (NVIDIA, NVIDIA GeForce GT 710 Direct3D11 vs_5_0 ps_5_0, D3D11)"
},
})
print('profile id=', self.profile_id)
profile = gl.getProfile(self.profile_id)
print('new profile name=', profile.get("name"))
return self.profile_id
profile = CreateProfile()
profile.create_profile()
but when i run this code for start the profile which is created with upper code...
it open another profile with default prefreces.. it does not that profile which i created upper.
from selenium import webdriver
from selenium.webdriver.common.by import By
from links import links
from create_profile import CreateProfile
import time
from selenium.webdriver.chrome.options import Options
from gologin import GoLogin
what a joke man..
this code is for create new profile and get return their id for opening it.. it create profile successfully with the same preference i want to in profile... and also save the profile on Gologin Software.. 👇 from gologin import GoLogin import random
from selenium import webdriver
import time
TOKEN = "token"
class CreateProfile:
profile = CreateProfile()
profile.create_profile()
but when i run this code for start the profile which is created with upper code... it open another profile with default prefreces.. it does not that profile which i created upper.
from selenium import webdriver from selenium.webdriver.common.by import By
from links import links
from create_profile import CreateProfile import time from selenium.webdriver.chrome.options import Options from gologin import GoLogin
TOKEN = "token"
class CookieRobot:
profile = CreateProfile() collect = CookieRobot() collect.start_profile(id=profile.create_profile())
is anyone have the solution for tis problem.???