Escriu per cercar…

Astral

Introducció

Astral

shell
deno init astral
cd astral
deno add add jsr:@astral/astral
ts
screenshot.ts
// Import Astral
import { launch } from "@astral/astral"

// Launch the browser
    await using browser = await launch();

// Open a new page
    await using page = await browser.newPage("https://deno.land");

// Take a screenshot of the page and save that to disk
const screenshot = await page.screenshot();
Deno.writeFileSync("screenshot.png", screenshot);

// Clean up is performed automatically
shell
deno run --allow-all .\screenshot.ts

Estàs llegint una vista prèvia.

Inicia la sessió amb Google per llegir la pàgina sencera.

Inicia la sessió amb Google

Només et demanarem que acceptis les condicions del servei.