Spoof User Agent to a more common one

This commit is contained in:
2025-12-16 17:27:43 +00:00
parent 46c559e3c9
commit 215a0f9f8d

View File

@@ -21,7 +21,7 @@ class StationParser:
def __init__(self, timeout: int = 10): def __init__(self, timeout: int = 10):
self.timeout = aiohttp.ClientTimeout(total=timeout) self.timeout = aiohttp.ClientTimeout(total=timeout)
self.user_agent = "XMPP-RadioBot/1.0" self.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36"
async def fetch_url(self, url: str) -> Optional[str]: async def fetch_url(self, url: str) -> Optional[str]:
headers = {"User-Agent": self.user_agent} headers = {"User-Agent": self.user_agent}