24 lines
732 B
JavaScript

import puppeteer from 'puppeteer-core';
const browser = await puppeteer.launch({
headless: 'new',
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
args: ['--no-sandbox', '--disable-setuid-sandbox']
});
const page = await browser.newPage();
await page.setViewport({ width: 1200, height: 800 });
await page.goto('file:///Users/jakeshore/.clawdbot/workspace/solana-bot-infographic/index.html', { waitUntil: 'networkidle0' });
// Wait for fonts
await new Promise(r => setTimeout(r, 2000));
await page.screenshot({
path: '/Users/jakeshore/.clawdbot/workspace/solana-bot-infographic/infographic.png',
fullPage: true,
type: 'png'
});
console.log('Screenshot saved!');
await browser.close();