small fix

This commit is contained in:
Daniel
2023-07-02 19:43:30 +03:30
parent 97fcec9968
commit 5e6057f17b
6 changed files with 57 additions and 826 deletions
-9
View File
@@ -1,8 +1,5 @@
import { Page, chromium, devices } from "playwright";
import { prisma } from "@/lib/api/db";
// import puppeteer from "puppeteer-extra";
// import AdblockerPlugin from "puppeteer-extra-plugin-adblocker";
// import StealthPlugin from "puppeteer-extra-plugin-stealth";
import createFile from "@/lib/api/storage/createFile";
export default async function archive(
@@ -15,14 +12,8 @@ export default async function archive(
const page = await context.newPage();
try {
// puppeteer.use(AdblockerPlugin()).use(StealthPlugin());
// const page = await browser.newPage();
await page.goto(url, { waitUntil: "domcontentloaded", timeout: 300000 });
// await page.setViewport({ width: 1080, height: 1024 });
await autoScroll(page);
const linkExists = await prisma.link.findUnique({