antibotbrowser 1.0.8 → 2.0.0
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/README.md +4 -15
- package/index.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,9 @@ const antibotbrowser = require("antibotbrowser");
|
|
|
13
13
|
## 3 - And let's run our browser
|
|
14
14
|
```js
|
|
15
15
|
var antibrowser = await antibotbrowser.startbrowser(9222);
|
|
16
|
+
|
|
16
17
|
//OR HİDE MOD (headless / no-sandbox) Mode Open browser
|
|
18
|
+
|
|
17
19
|
var antibrowser = await antibotbrowser.startbrowser_hide(9222);
|
|
18
20
|
```
|
|
19
21
|
|
|
@@ -46,9 +48,9 @@ const antibotbrowser = require("antibotbrowser");
|
|
|
46
48
|
const puppeteer = require('puppeteer');
|
|
47
49
|
(async () => {
|
|
48
50
|
|
|
49
|
-
const antibrowser = await antibotbrowser.startbrowser(); // We start the browser with
|
|
51
|
+
const antibrowser = await antibotbrowser.startbrowser(9222); // We start the browser with settings Port: 9222
|
|
50
52
|
|
|
51
|
-
const browser = await puppeteer.connect({browserWSEndpoint: antibrowser.websokcet}); // We connect the launched browser to puppeteer. With the variable we created above, it gives the web socket url to puppetter with antibotbrowser.websocket
|
|
53
|
+
const browser = await puppeteer.connect({browserWSEndpoint: antibrowser.websokcet}); // We connect the launched browser to puppeteer. With the variable we created above, it gives the web socket url to puppetter with antibotbrowser.websocket.
|
|
52
54
|
|
|
53
55
|
// Normal use from now on
|
|
54
56
|
const page = await browser.newPage();
|
|
@@ -59,16 +61,3 @@ const puppeteer = require('puppeteer');
|
|
|
59
61
|
|
|
60
62
|
})();
|
|
61
63
|
```
|
|
62
|
-
|
|
63
|
-
## Arguments
|
|
64
|
-
```js
|
|
65
|
-
antibotbrowser.startbrowser(port, url);
|
|
66
|
-
// port: The debugging port is the debugging port of the chromium browser. There can be 1 browser on the same port number, so you can add it as an argument. By default, if you enter nothing, the port is 9222.
|
|
67
|
-
|
|
68
|
-
// url: The first page address on browser startup. If you leave it blank, it defaults to google.com.
|
|
69
|
-
|
|
70
|
-
// Examples
|
|
71
|
-
antibotbrowser.startbrowser(9223, "https://github.com");
|
|
72
|
-
antibotbrowser.startbrowser(9222, "https://google.com");
|
|
73
|
-
// note do not start 2 scanners on the same port!!!
|
|
74
|
-
```
|
package/index.js
CHANGED
|
@@ -55,7 +55,9 @@ async function startbrowser(port) {
|
|
|
55
55
|
veri = await JSON.parse(res.getBody())
|
|
56
56
|
useragent = await veri["User-Agent"];
|
|
57
57
|
websokcet = await veri["webSocketDebuggerUrl"];
|
|
58
|
-
|
|
58
|
+
|
|
59
|
+
resolve( { useragent, websokcet } )
|
|
60
|
+
|
|
59
61
|
|
|
60
62
|
} catch (error) {
|
|
61
63
|
startbrowser(port);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antibotbrowser",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"readme": "README.md",
|
|
5
5
|
"description": "Opening Chromium opens a real browser without bot validations in automated systems like Puppetter. To avoid problems in places like Cloudflare",
|
|
6
6
|
"main": "index.js",
|