brave-real-browser 2.0.2 → 2.0.3

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.
Files changed (2) hide show
  1. package/README.md +18 -120
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,37 +1,3 @@
1
- > [!WARNING]
2
- > This repo will no longer receive updates. Thank you to everyone who supported it.
3
-
4
- <br/>
5
- <p align="center">
6
- <a href="https://github.com/codeiva4u/Brave-Real-Browser">
7
- <img src="https://github.com/zfcsoftware/puppeteer-real-browser/assets/123484092/cc8b5fb9-504a-4fd3-97f6-a51990bb4303" alt="Logo" width="80" height="80">
8
- </a>
9
-
10
- <h3 align="center">Brave Real Browser</h3>
11
-
12
- <p align="center">
13
- This package prevents Puppeteer from being detected as a bot in services like Cloudflare and allows you to pass captchas without any problems. It behaves like a real browser.
14
- <br/>
15
- <br/>
16
- If you are only interested in Cloudflare WAF, please check this repo:<br/> https://github.com/zfcsoftware/cf-clearance-scraper
17
- </p>
18
- </p>
19
-
20
- <p align="center">
21
- <video src='https://github.com/user-attachments/assets/5dddca09-6941-42e9-9427-5c666632483f'/>
22
- </p>
23
-
24
- <p align="center">
25
- <img src="https://img.shields.io/github/contributors/codeiva4u/Brave-Real-Browser?color=dark-green" alt="Contributors" />
26
- <img src="https://img.shields.io/github/forks/codeiva4u/Brave-Real-Browser?style=social" alt="Forks" />
27
- <img src="https://img.shields.io/github/stars/codeiva4u/Brave-Real-Browser?style=social" alt="Stargazers" />
28
- <img src="https://img.shields.io/github/issues/codeiva4u/Brave-Real-Browser" alt="Issues" />
29
- <img src="https://img.shields.io/github/license/codeiva4u/Brave-Real-Browser" alt="License" />
30
- </p>
31
-
32
- ## Sponsor
33
-
34
- [![ScrapeDo](data/sdo.gif)](https://scrape.do/?utm_source=github&utm_medium=repo_prb)
35
1
 
36
2
  ## Installation
37
3
 
@@ -47,56 +13,33 @@ if you are using linux:
47
13
  sudo apt-get install xvfb
48
14
  ```
49
15
 
50
- ## Include
16
+ ## Docker
51
17
 
52
- ### CommonJS
18
+ You can use the Dockerfile file in the main directory to use this library with docker. It has been tested with docker on Ubuntu server operating systems.
53
19
 
54
- ```js
55
- const { connect } = require("brave-real-browser");
20
+ To run a test, you can follow these steps
56
21
 
57
- const start = async () => {
58
- const { page, browser } = await connect();
59
- };
22
+ ```bash
23
+ git clone https://github.com/codeiva4u/Brave-Real-Browser.git
60
24
  ```
61
25
 
62
- ### Module
63
-
64
- ```js
65
- import { connect } from "brave-real-browser";
66
-
67
- const { page, browser } = await connect();
26
+ ```bash
27
+ cd brave-real-browser
28
+ ```
29
+ ```bash
30
+ npm run cjs_test
68
31
  ```
69
32
 
70
- ## Usage
71
-
72
- ```js
73
- const { connect } = require("brave-real-browser");
74
-
75
- async function test() {
76
- const { browser, page } = await connect({
77
- headless: false,
78
-
79
- args: [],
80
-
81
- customConfig: {},
82
-
83
- turnstile: true,
84
-
85
- connectOption: {},
33
+ ```bash
34
+ npm run esm_test
35
+ ```
86
36
 
87
- disableXvfb: false,
88
- ignoreAllFlags: false,
89
- // proxy:{
90
- // host:'<proxy-host>',
91
- // port:'<proxy-port>',
92
- // username:'<proxy-username>',
93
- // password:'<proxy-password>'
94
- // }
95
- });
96
- await page.goto("<url>");
97
- }
37
+ ```bash
38
+ docker build -t brave-real-browser-project .
39
+ ```
98
40
 
99
- test();
41
+ ```bash
42
+ docker run brave-real-browser-project
100
43
  ```
101
44
 
102
45
  **headless**: The default value is false. Values such as “new”, true, “shell” can also be sent, but it works most stable when false is used.
@@ -124,51 +67,6 @@ The following is an example of installing a plugin. You can install other plugin
124
67
  npm i puppeteer-extra-plugin-click-and-wait
125
68
  ```
126
69
 
127
- ```js
128
- const test = require("node:test");
129
- const assert = require("node:assert");
130
- const { connect } = require("brave-real-browser");
131
-
132
- test("Puppeteer Extra Plugin", async () => {
133
- const { page, browser } = await connect({
134
- args: ["--start-maximized"],
135
- turnstile: true,
136
- headless: false,
137
- // disableXvfb: true,
138
- customConfig: {},
139
- connectOption: {
140
- defaultViewport: null,
141
- },
142
- plugins: [require("puppeteer-extra-plugin-click-and-wait")()],
143
- });
144
- await page.goto("https://google.com", { waitUntil: "domcontentloaded" });
145
- await page.clickAndWaitForNavigation("body");
146
- await browser.close();
147
- });
148
- ```
149
-
150
- ## Docker
151
-
152
- You can use the Dockerfile file in the main directory to use this library with docker. It has been tested with docker on Ubuntu server operating systems.
153
-
154
- To run a test, you can follow these steps
155
-
156
- ```bash
157
- git clone https://github.com/codeiva4u/Brave-Real-Browser.git
158
- ```
159
-
160
- ```bash
161
- cd brave-real-browser
162
- ```
163
-
164
- ```bash
165
- docker build -t brave-real-browser-project .
166
- ```
167
-
168
- ```bash
169
- docker run brave-real-browser-project
170
- ```
171
-
172
70
  ## Support Us
173
71
 
174
72
  This library is completely open source and is constantly being updated. Please star this repo to support this project. Starring and supporting the project will ensure that it receives updates. If you want to support it further, you can consider sponsoring me (https://github.com/sponsors/codeiva4u)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brave-real-browser",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "This package is designed to bypass puppeteer's bot-detecting captchas such as Cloudflare. It acts like a real browser and can be managed with puppeteer.",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/esm/index.mjs",
@@ -36,8 +36,8 @@
36
36
  "author": "codeiva4u",
37
37
  "license": "ISC",
38
38
  "dependencies": {
39
- "brave-real-launcher": "^1.2.40",
40
- "brave-real-puppeteer-core": "^24.34.0-patch.5",
39
+ "brave-real-launcher": "^1.2.43",
40
+ "brave-real-puppeteer-core": "^24.34.0-patch.9",
41
41
  "ghost-cursor": "^1.4.1",
42
42
  "puppeteer-extra": "^3.3.6",
43
43
  "tree-kill": "^1.2.2",