auto / test_linuxdo.js
github-actions[bot]
GitHub deploy: cdd1251aafcc7267d5c51954d23cb4565eba35a0
cc9afac
Raw
History Blame Contribute Delete
872 Bytes
import { connect } from "puppeteer-real-browser";
while (true) {
console.log("Start of test.js");
const { page, browser } = await connect({
headless: 'auto',
args: [],
customConfig: {},
skipTarget: [],
fingerprint: false,
turnstile: true,
connectOption: {},
});
var cl = setInterval(() => {
page
.screenshot({ path: "example.png", fullPage: true })
.catch((e) => console.log(e.message));
}, 1000);
console.log("Connected to browser");
// https://nopecha.com/demo/cloudflare https://linux.do
await page.goto("https://linux.do", {
waitUntil: "domcontentloaded",
});
console.log("Navigated to page");
await page.waitForSelector(".link_row", {
timeout: 60000,
});
// await page.screenshot({ path: 'example.png' });
clearInterval(cl);
await browser.close();
console.log("End of test.js");
}