Skip to content

Commit 9c1ae01

Browse files
committed
disable pupeteer:
1 parent 9827a31 commit 9c1ae01

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/functions/domain.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import puppeteer from "puppeteer";
1+
// import puppeteer from "puppeteer";
22

33
// import metrics from "../metrics";
44
import { prisma } from "../prisma";
@@ -52,36 +52,36 @@ export async function domainCheck(domain: string) {
5252
});
5353
}
5454

55-
// Launch the browser and open a new blank page
56-
const browser = await puppeteer.launch({ headless: "shell" });
57-
const page = await browser.newPage();
55+
// // Launch the browser and open a new blank page
56+
// const browser = await puppeteer.launch({ headless: "shell" });
57+
// const page = await browser.newPage();
5858

59-
// Navigate the page to a URL.
60-
await page.goto(`https://${domain}`, {
61-
waitUntil: "networkidle2",
62-
});
59+
// // Navigate the page to a URL.
60+
// await page.goto(`https://${domain}`, {
61+
// waitUntil: "networkidle2",
62+
// });
6363

64-
// Set screen size.
65-
await page.setViewport({ width: 1080, height: 1024 });
64+
// // Set screen size.
65+
// await page.setViewport({ width: 1080, height: 1024 });
6666

67-
// Capture screenshot to a buffer
68-
let pageimgBuffer = await page.screenshot({
69-
type: "png",
70-
encoding: "binary",
71-
});
67+
// // Capture screenshot to a buffer
68+
// let pageimgBuffer = await page.screenshot({
69+
// type: "png",
70+
// encoding: "binary",
71+
// });
7272

73-
await prisma.capture.create({
74-
data: {
75-
domain: {
76-
connect: {
77-
id: dbDomain.id,
78-
},
79-
},
80-
binary: pageimgBuffer,
81-
},
82-
});
73+
// await prisma.capture.create({
74+
// data: {
75+
// domain: {
76+
// connect: {
77+
// id: dbDomain.id,
78+
// },
79+
// },
80+
// binary: pageimgBuffer,
81+
// },
82+
// });
8383

84-
await browser.close();
84+
// await browser.close();
8585
// metrics.timing("functions.timing.domainCheck", Date.now() - tsStart);
8686

8787
return {

0 commit comments

Comments
 (0)