Skip to content

Commit

Permalink
chore: 使用import
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Jul 25, 2024
1 parent 52855e9 commit 9310254
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Binary file modified example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 6 additions & 7 deletions pteer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const fs = require("fs");

const path = require("path");
const puppeteer = require("puppeteer-extra");
const StealthPlugin = require("puppeteer-extra-plugin-stealth");
import fs from "fs";
import path from "path";
import puppeteer from "puppeteer-extra";
import StealthPlugin from "puppeteer-extra-plugin-stealth";
import dotenv from "dotenv";

puppeteer.use(StealthPlugin());
const dotenv = require("dotenv");

// Load the default .env file
dotenv.config();
Expand Down Expand Up @@ -279,4 +278,4 @@ async function bypassDetection(page) {
get: () => ["en-US", "en"],
});
});
}
}
3 changes: 2 additions & 1 deletion test_linuxdo.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ while (true) {
.catch((e) => console.log(e.message));
}, 1000);
console.log("Connected to browser");
await page.goto("https://linux.do", {
// https://nopecha.com/demo/cloudflare https://linux.do
await page.goto("https://nopecha.com/demo/cloudflare", {
waitUntil: "domcontentloaded",
});
console.log("Navigated to page");
Expand Down

0 comments on commit 9310254

Please sign in to comment.