brave-real-browser 1.5.93 → 1.5.95
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/.github/workflows/publish.yml +3 -3
- package/package.json +1 -1
- package/test/cjs/test.js +16 -2
- package/test/esm/test.js +16 -2
|
@@ -23,8 +23,8 @@ on:
|
|
|
23
23
|
jobs:
|
|
24
24
|
publish:
|
|
25
25
|
runs-on: ubuntu-latest
|
|
26
|
-
# Skip if commit
|
|
27
|
-
if: "
|
|
26
|
+
# Skip if commit contains [skip ci] to prevent infinite loop
|
|
27
|
+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
|
28
28
|
|
|
29
29
|
steps:
|
|
30
30
|
- name: Checkout
|
|
@@ -68,7 +68,7 @@ jobs:
|
|
|
68
68
|
npm install --package-lock-only
|
|
69
69
|
|
|
70
70
|
git add package.json package-lock.json
|
|
71
|
-
git commit -m "Auto increment v$OLD_VERSION -> v$NEW_VERSION"
|
|
71
|
+
git commit -m "Auto increment v$OLD_VERSION -> v$NEW_VERSION [skip ci]"
|
|
72
72
|
git tag "v$NEW_VERSION"
|
|
73
73
|
|
|
74
74
|
- name: Push Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brave-real-browser",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.95",
|
|
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",
|
package/test/cjs/test.js
CHANGED
|
@@ -87,9 +87,23 @@ test('Cloudflare Turnstile', async () => {
|
|
|
87
87
|
test('Fingerprint JS Bot Detector', async () => {
|
|
88
88
|
const { page, browser } = await connect(realBrowserOption)
|
|
89
89
|
await page.goto("https://fingerprint.com/products/bot-detection/");
|
|
90
|
-
|
|
90
|
+
|
|
91
|
+
// Wait for the bot detection section to load
|
|
92
|
+
await page.waitForSelector('.HeroSection-module--botSubTitle--2711e', { timeout: 15000 });
|
|
93
|
+
|
|
94
|
+
// Give extra time for bot detection to complete
|
|
95
|
+
await new Promise(r => setTimeout(r, 7000));
|
|
96
|
+
|
|
91
97
|
const detect = await page.evaluate(() => {
|
|
92
|
-
|
|
98
|
+
const element = document.querySelector('.HeroSection-module--botSubTitle--2711e');
|
|
99
|
+
if (!element) {
|
|
100
|
+
console.log('Bot detection element not found');
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
const textContent = element.textContent.toLowerCase();
|
|
104
|
+
console.log('Bot detection text:', textContent);
|
|
105
|
+
// Check if text contains "not" which indicates we are not detected as a bot
|
|
106
|
+
return textContent.includes("not") ? true : false;
|
|
93
107
|
})
|
|
94
108
|
await browser.close()
|
|
95
109
|
assert.strictEqual(detect, true, "Fingerprint JS Bot Detector test failed!")
|
package/test/esm/test.js
CHANGED
|
@@ -90,9 +90,23 @@ test('Cloudflare Turnstile', async () => {
|
|
|
90
90
|
test('Fingerprint JS Bot Detector', async () => {
|
|
91
91
|
const { page, browser } = await connect(realBrowserOption)
|
|
92
92
|
await page.goto("https://fingerprint.com/products/bot-detection/");
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
// Wait for the bot detection section to load
|
|
95
|
+
await page.waitForSelector('.HeroSection-module--botSubTitle--2711e', { timeout: 15000 });
|
|
96
|
+
|
|
97
|
+
// Give extra time for bot detection to complete
|
|
98
|
+
await new Promise(r => setTimeout(r, 7000));
|
|
99
|
+
|
|
94
100
|
const detect = await page.evaluate(() => {
|
|
95
|
-
|
|
101
|
+
const element = document.querySelector('.HeroSection-module--botSubTitle--2711e');
|
|
102
|
+
if (!element) {
|
|
103
|
+
console.log('Bot detection element not found');
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
const textContent = element.textContent.toLowerCase();
|
|
107
|
+
console.log('Bot detection text:', textContent);
|
|
108
|
+
// Check if text contains "not" which indicates we are not detected as a bot
|
|
109
|
+
return textContent.includes("not") ? true : false;
|
|
96
110
|
})
|
|
97
111
|
await browser.close()
|
|
98
112
|
assert.strictEqual(detect, true, "Fingerprint JS Bot Detector test failed!")
|