fix: update User-Agent and add Accept and Accept-Language headers for iTunes fetch.

This commit is contained in:
Hördle Bot
2025-11-24 14:40:34 +01:00
parent 7f455053e7
commit e8e0aa27fb

View File

@@ -35,7 +35,9 @@ export async function getReleaseYearFromItunes(artist: string, title: string): P
const response = await fetch(url, { const response = await fetch(url, {
headers: { headers: {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.9'
} }
}); });