优化图文页

This commit is contained in:
2026-04-28 17:11:42 +08:00
parent 674c202264
commit 040273586b
69 changed files with 3939 additions and 2302 deletions
+5 -5
View File
@@ -1,6 +1,6 @@
// index.js
import { chromium } from 'playwright-extra';
import stealth from 'puppeteer-extra-plugin-stealth'
import { chromium } from "playwright-extra";
import stealth from "puppeteer-extra-plugin-stealth";
chromium.use(stealth());
@@ -8,9 +8,9 @@ chromium.use(stealth());
const browser = await chromium.launch({ headless: false }); // 需要可视化就 false
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://bot.sannysoft.com/'); // 常用自测页
console.log('Title:', await page.title());
await page.screenshot({ path: 'stealth.png', fullPage: true });
await page.goto("https://bot.sannysoft.com/"); // 常用自测页
console.log("Title:", await page.title());
await page.screenshot({ path: "stealth.png", fullPage: true });
setTimeout(async () => {
await browser.close();
}, 1000_000);