Merge branch 'revert-to-old'
Browse files
server.js
CHANGED
|
@@ -5,20 +5,8 @@ const StealthPlugin = require('puppeteer-extra-plugin-stealth');
|
|
| 5 |
const RecaptchaPlugin = require('puppeteer-extra-plugin-recaptcha');
|
| 6 |
const cors = require('cors');
|
| 7 |
const { EventEmitter } = require('events');
|
| 8 |
-
const os = require('os');
|
| 9 |
-
const fs = require('fs').promises;
|
| 10 |
-
const path = require('path');
|
| 11 |
-
|
| 12 |
-
// --- NEW: Configuration for the Solver ---
|
| 13 |
-
// You can optionally provide a 2Captcha API key to solve more complex captchas,
|
| 14 |
-
// but it's often not needed for the initial Cloudflare JS challenge.
|
| 15 |
-
// puppeteerExtra.use(
|
| 16 |
-
// RecaptchaPlugin({
|
| 17 |
-
// provider: { id: '2captcha', token: 'YOUR_2CAPTCHA_API_KEY' }
|
| 18 |
-
// })
|
| 19 |
-
// );
|
| 20 |
-
puppeteerExtra.use(StealthPlugin());
|
| 21 |
|
|
|
|
| 22 |
|
| 23 |
const app = express();
|
| 24 |
const port = 7860;
|
|
|
|
| 5 |
const RecaptchaPlugin = require('puppeteer-extra-plugin-recaptcha');
|
| 6 |
const cors = require('cors');
|
| 7 |
const { EventEmitter } = require('events');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
puppeteerExtra.use(StealthPlugin()); // NEW: Enable stealth plugin
|
| 10 |
|
| 11 |
const app = express();
|
| 12 |
const port = 7860;
|