--- import { extract } from "@extractus/article-extractor"; import AddressBar from "../components/AddressBar.astro"; import Post from "../components/Post.astro"; import Layout from "../layouts/Layout.astro"; import Library from "../components/Library.astro"; const params = Astro.url.searchParams; const url = params.get('url') || ''; let article; let skipSave; try { article = await extract(url); } catch { article = { title: "Something is not right", content: "

The article extractor did not get any result.

", }; skipSave = true; } if (!article) { article = { title: "Something is not right", content: "

The article extractor did not get any result.

", } skipSave = true; } if (url === '') { article = { title: "Welcome to Cozy 🧸", author: "Ayo Ayco", content: "

Enter a URL in the address bar above to get started.

", }; skipSave = true; } ---