mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-17 08:35:03 -04:00
📂 Out Directory overwrite
This commit is contained in:
parent
61deb9c49c
commit
1638b88775
1 changed files with 3 additions and 2 deletions
|
@ -10,9 +10,10 @@ import { bitmapsPath } from "./config";
|
|||
headless: true,
|
||||
});
|
||||
const page = await browser.newPage();
|
||||
await page.goto("https://google.com");
|
||||
await page.goto("https://example.com");
|
||||
|
||||
if (!fs.existsSync(bitmapsPath)) fs.mkdirSync(bitmapsPath);
|
||||
|
||||
fs.mkdirSync(bitmapsPath);
|
||||
await page.pdf({ path: path.resolve(bitmapsPath, "google.pdf") });
|
||||
|
||||
await browser.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue