gologin 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ const GoLogin = require('../gologin');
15
15
  });
16
16
 
17
17
  const page = await browser.newPage();
18
- await page.goto('https://myip.gologin.app/mini');
18
+ await page.goto('https://myip.link');
19
19
  console.log(await page.content());
20
20
  await browser.close();
21
21
  await GL.stopLocal({posting: false});
package/gologin.js CHANGED
@@ -1102,8 +1102,6 @@ class GoLogin {
1102
1102
 
1103
1103
  if (profileResponse.body === 'ok') {
1104
1104
  let wsUrl = await this.waitDebuggingUrl(delay_ms);
1105
- // const wsUrl = `wss://${this.profile_id}.orbita.gologin.app`
1106
- // const wsUrl = `wss://${this.profile_id}.orbita.gologin.com`
1107
1105
  return { 'status': 'success', wsUrl }
1108
1106
  }
1109
1107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gologin",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "A high-level API to control Orbita browser over GoLogin API",
5
5
  "main": "./gologin.js",
6
6
  "repository": {
@@ -28,5 +28,5 @@ chrome.setDefaultService(new chrome.ServiceBuilder('./chromedriver').build());
28
28
  .setChromeOptions(chromeOptions)
29
29
  .build();
30
30
 
31
- await driver.get('https://myip.gologin.app/mini')
31
+ await driver.get('https://myip.link')
32
32
  })();
@@ -170,9 +170,9 @@ class GoLogin(object):
170
170
  proxy = self.proxy
171
171
  if proxy:
172
172
  proxies = {proxy.get('mode'): self.formatProxyUrlPassword(proxy)}
173
- data = requests.get('https://time.gologin.app', proxies=proxies)
173
+ data = requests.get('https://time.gologin.com', proxies=proxies)
174
174
  else:
175
- data = requests.get('https://time.gologin.app')
175
+ data = requests.get('https://time.gologin.com')
176
176
  return json.loads(data.content.decode('utf-8'))
177
177
 
178
178
 
@@ -305,9 +305,8 @@ class GoLogin(object):
305
305
 
306
306
  def updatePreferences(self):
307
307
  pref_file = os.path.join(self.profile_path, 'Default/Preferences')
308
- pfile = open(pref_file, 'r')
309
- preferences = json.load(pfile)
310
- pfile.close()
308
+ with open(pref_file, 'r', encoding="utf-8") as pfile:
309
+ preferences = json.load(pfile)
311
310
  profile = self.profile
312
311
  proxy = self.profile.get('proxy')
313
312
  # print('proxy=', proxy)
@@ -425,7 +424,7 @@ class GoLogin(object):
425
424
  profile = self.getProfile()
426
425
  for k,v in options.items():
427
426
  profile[k] = v
428
- return json.loads(requests.put(API_URL + '/browser/' + profile_id, headers=self.headers(), json=profile).content.decode('utf-8'))
427
+ return json.loads(requests.put(API_URL + '/browser/' + self.profile_id, headers=self.headers(), json=profile).content.decode('utf-8'))
429
428
 
430
429
  def waitDebuggingUrl(self, delay_s, try_count=3):
431
430
  url = 'https://' + self.profile_id + '.orbita.gologin.com/json/version'