update user agent so less sites block us

This commit is contained in:
Will Freeman
2026-03-05 11:01:38 -07:00
parent 8bad24ad04
commit 959b5cdb78

View File

@@ -33,7 +33,7 @@ const MONTH_NAMES = [
async function fetchArticleText(url) {
const response = await fetch(url, {
headers: { 'User-Agent': 'Mozilla/5.0 (compatible; import-win/1.0)' },
headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' },
signal: AbortSignal.timeout(15000),
});
if (!response.ok) throw new Error(`Failed to fetch article: ${response.status} ${response.statusText}`);