Enable redirects and use correct storefront header

This commit is contained in:
Rafael Moraes
2026-04-27 08:54:22 -03:00
parent a009071a8d
commit 4e28b7e9a3
+2 -1
View File
@@ -77,6 +77,7 @@ class ItunesApi:
client = httpx.AsyncClient(
timeout=60.0,
follow_redirects=True,
)
return cls(
@@ -133,7 +134,7 @@ class ItunesApi:
response = await self.client.get(
ITUNES_PAGE_API_URL.format(media_type=media_type, media_id=media_id),
headers={
"X-Apple-Store-Front": f"{self.storefront_id}-1,32 t:music31",
"X-Apple-Store-Front": f"{self.storefront_id}-28,32 t:music31",
},
)
response.raise_for_status()