gologin-commonjs 2.1.1
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.
- package/babel.config.json +17 -0
- package/dist/README.md +163 -0
- package/dist/example.js +35 -0
- package/dist/examples/example-amazon-cloud-browser.js +52 -0
- package/dist/examples/example-amazon-headless.js +56 -0
- package/dist/examples/example-amazon.js +53 -0
- package/dist/examples/example-create-custom-profile.js +42 -0
- package/dist/examples/example-create-profile.js +43 -0
- package/dist/examples/example-custom-args.js +34 -0
- package/dist/examples/example-fast-profile-settings.js +59 -0
- package/dist/examples/example-gmail.js +82 -0
- package/dist/examples/example-iphey.js +19 -0
- package/dist/examples/example-local-profile.js +28 -0
- package/dist/examples/example-login-walmart.js +38 -0
- package/dist/examples/example-startremote.js +29 -0
- package/dist/examples/example-stopremote.js +22 -0
- package/dist/examples/example-timezone.js +51 -0
- package/dist/fonts.js +3339 -0
- package/dist/fonts_config +104 -0
- package/dist/gologin-browser-ext.zip +0 -0
- package/dist/gologin_zeroprofile.b64 +1 -0
- package/dist/index.d.ts +61 -0
- package/dist/profile_export_example.csv +2 -0
- package/dist/run.sh +1 -0
- package/dist/src/bookmarks/utils.js +23 -0
- package/dist/src/browser/browser-api.js +106 -0
- package/dist/src/browser/browser-checker.js +336 -0
- package/dist/src/browser/browser-user-data-manager.js +306 -0
- package/dist/src/cookies/cookies-manager.js +164 -0
- package/dist/src/extensions/extensions-extractor.js +50 -0
- package/dist/src/extensions/extensions-manager.js +301 -0
- package/dist/src/extensions/user-extensions-manager.js +246 -0
- package/dist/src/gologin-api.js +103 -0
- package/dist/src/gologin.js +1319 -0
- package/dist/src/profile/profile-archiver.js +68 -0
- package/dist/src/profile/profile-directories-to-remove.js +71 -0
- package/dist/src/utils/browser.js +59 -0
- package/dist/src/utils/common.js +60 -0
- package/dist/src/utils/constants.js +7 -0
- package/dist/src/utils/utils.js +53 -0
- package/dist/test.html +1 -0
- package/dist/zero_profile.zip +0 -0
- package/gologin/.eslintrc.json +290 -0
- package/gologin/.sentry-native/a65389b2-9a7d-41ed-7de5-95c4570f0d3d.run.lock +0 -0
- package/gologin/README.md +163 -0
- package/gologin/example.js +36 -0
- package/gologin/examples/example-amazon-cloud-browser.js +44 -0
- package/gologin/examples/example-amazon-headless.js +50 -0
- package/gologin/examples/example-amazon.js +47 -0
- package/gologin/examples/example-create-custom-profile.js +39 -0
- package/gologin/examples/example-create-profile.js +40 -0
- package/gologin/examples/example-custom-args.js +34 -0
- package/gologin/examples/example-fast-profile-settings.js +69 -0
- package/gologin/examples/example-gmail.js +67 -0
- package/gologin/examples/example-iphey.js +17 -0
- package/gologin/examples/example-local-profile.js +26 -0
- package/gologin/examples/example-login-walmart.js +35 -0
- package/gologin/examples/example-startremote.js +25 -0
- package/gologin/examples/example-stopremote.js +20 -0
- package/gologin/examples/example-timezone.js +44 -0
- package/gologin/fonts.js +3339 -0
- package/gologin/fonts_config +104 -0
- package/gologin/gologin-browser-ext.zip +0 -0
- package/gologin/gologin_zeroprofile.b64 +1 -0
- package/gologin/index.d.ts +61 -0
- package/gologin/package.json +49 -0
- package/gologin/profile_export_example.csv +2 -0
- package/gologin/run.sh +1 -0
- package/gologin/src/bookmarks/utils.js +16 -0
- package/gologin/src/browser/browser-api.js +95 -0
- package/gologin/src/browser/browser-checker.js +392 -0
- package/gologin/src/browser/browser-user-data-manager.js +335 -0
- package/gologin/src/cookies/cookies-manager.js +189 -0
- package/gologin/src/extensions/extensions-extractor.js +56 -0
- package/gologin/src/extensions/extensions-manager.js +384 -0
- package/gologin/src/extensions/user-extensions-manager.js +295 -0
- package/gologin/src/gologin-api.js +110 -0
- package/gologin/src/gologin.js +1553 -0
- package/gologin/src/profile/profile-archiver.js +86 -0
- package/gologin/src/profile/profile-directories-to-remove.js +75 -0
- package/gologin/src/utils/browser.js +62 -0
- package/gologin/src/utils/common.js +76 -0
- package/gologin/src/utils/constants.js +1 -0
- package/gologin/src/utils/utils.js +49 -0
- package/gologin/test.html +1 -0
- package/gologin/zero_profile.zip +0 -0
- package/package.json +46 -0
- package/tes.js +35 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Usage example: in the terminal enter
|
|
2
|
+
// node example-startremote.js yU0token yU0Pr0f1leiD
|
|
3
|
+
|
|
4
|
+
// your token api (located in the settings, api)
|
|
5
|
+
// https://github.com/gologinapp/gologin#usage
|
|
6
|
+
import GoLogin from '../src/gologin.js';
|
|
7
|
+
|
|
8
|
+
const GOLOGIN_API_TOKEN = process.argv[2];
|
|
9
|
+
// your profile id
|
|
10
|
+
const GOLOGIN_PROFILE_ID = process.argv[3];
|
|
11
|
+
|
|
12
|
+
(async () => {
|
|
13
|
+
const GL = new GoLogin({
|
|
14
|
+
token: GOLOGIN_API_TOKEN,
|
|
15
|
+
profile_id: GOLOGIN_PROFILE_ID,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// connection of the remote work method
|
|
19
|
+
const { status, wsUrl } = await GL.startRemote();
|
|
20
|
+
|
|
21
|
+
const GOLOGIN_PROFILE_CLOUD_URL = wsUrl.split('/')[2];
|
|
22
|
+
console.log('Done! Launch web browser and navigate to URL:', GOLOGIN_PROFILE_CLOUD_URL);
|
|
23
|
+
})();
|
|
24
|
+
|
|
25
|
+
// after running the script, the url will appear on the terminal
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Usage example: in the terminal enter
|
|
2
|
+
// node example-stopremote.js yU0token yU0Pr0f1leiD
|
|
3
|
+
|
|
4
|
+
// your token api (located in the settings, api)
|
|
5
|
+
// https://github.com/gologinapp/gologin#usage
|
|
6
|
+
import GoLogin from '../src/gologin.js';
|
|
7
|
+
|
|
8
|
+
const GOLOGIN_API_TOKEN = process.argv[2];
|
|
9
|
+
// your profile id
|
|
10
|
+
const GOLOGIN_PROFILE_ID = process.argv[3];
|
|
11
|
+
|
|
12
|
+
(async () => {
|
|
13
|
+
const GL = new GoLogin({
|
|
14
|
+
token: GOLOGIN_API_TOKEN,
|
|
15
|
+
profile_id: GOLOGIN_PROFILE_ID,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// stop profile
|
|
19
|
+
await GL.stopRemote();
|
|
20
|
+
})();
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import puppeteer from 'puppeteer-core';
|
|
2
|
+
|
|
3
|
+
import GoLogin from '../src/gologin.js';
|
|
4
|
+
|
|
5
|
+
const { connect } = puppeteer;
|
|
6
|
+
|
|
7
|
+
const delay = ms => new Promise(res => setTimeout(res, ms));
|
|
8
|
+
|
|
9
|
+
(async () => {
|
|
10
|
+
const GL = new GoLogin({
|
|
11
|
+
token: 'yU0token',
|
|
12
|
+
profile_id: 'yU0Pr0f1leiD',
|
|
13
|
+
timezone: {
|
|
14
|
+
ip:'1.1.1.1',
|
|
15
|
+
timezone:'Europe/Amsterdam',
|
|
16
|
+
accuracy:100,
|
|
17
|
+
ll: ['52.3759','4.8975'],
|
|
18
|
+
country: 'NL',
|
|
19
|
+
city: 'Amsterdam',
|
|
20
|
+
stateProv:'',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const { status, wsUrl } = await GL.start();
|
|
25
|
+
const browser = await connect({
|
|
26
|
+
browserWSEndpoint: wsUrl.toString(),
|
|
27
|
+
ignoreHTTPSErrors: true,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const page = await browser.newPage();
|
|
31
|
+
|
|
32
|
+
const viewPort = GL.getViewPort();
|
|
33
|
+
await page.setViewport({ width: Math.round(viewPort.width * 0.994), height: Math.round(viewPort.height * 0.92) });
|
|
34
|
+
const session = await page.target().createCDPSession();
|
|
35
|
+
const { windowId } = await session.send('Browser.getWindowForTarget');
|
|
36
|
+
await session.send('Browser.setWindowBounds', { windowId, bounds: viewPort });
|
|
37
|
+
await session.detach();
|
|
38
|
+
|
|
39
|
+
await page.goto('https://myip.link');
|
|
40
|
+
|
|
41
|
+
await delay(60000);
|
|
42
|
+
await browser.close();
|
|
43
|
+
await GL.stop();
|
|
44
|
+
})();
|