diff --git a/src/lib/utils/extract.ts b/src/lib/utils/extract.ts index d6e3ec3..b60188f 100644 --- a/src/lib/utils/extract.ts +++ b/src/lib/utils/extract.ts @@ -58,8 +58,20 @@ export async function extractArticle(url: string): Promise { }); if (!response.ok) { - if (response.status === 403) { - throw new Error(`This site blocks automated access (403 Forbidden). Try using the bookmarklet from the article page instead - it can capture content your browser can see.`); + // On 403/blocked, return minimal article with just URL info + if (response.status === 403 || response.status === 401) { + const hostname = new URL(url).hostname.replace(/^www\./, ""); + return { + title: `Article from ${hostname}`, + author: null, + siteName: hostname, + excerpt: "This site blocked automated access. Use 'Open original' to read, or the Content Capture bookmarklet to save the full article.", + content: `

This site blocked automated access. Open original article to read.

Tip: Use the Content Capture bookmarklet from the article page to save the full content.

`, + textContent: "This site blocked automated access. Open original article to read.", + leadImage: null, + wordCount: 0, + publishedAt: null, + }; } throw new Error(`Failed to fetch: ${response.status} ${response.statusText}`); }