From 68c69aa3d11152eea816aeefa7118749e28551c2 Mon Sep 17 00:00:00 2001 From: Maxim Ivanov Date: Sat, 26 Jul 2025 09:45:54 +0200 Subject: [PATCH] [common http] improve the User-Agent identification (#470) Properly identifying endoflife.date bot is more fair for website administrators, and give them the ability to more easily authorize the bot if they want to. --------- Co-authored-by: Marc Wrobel --- src/common/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/http.py b/src/common/http.py index 2b3172f6..3e9085e3 100644 --- a/src/common/http.py +++ b/src/common/http.py @@ -16,7 +16,7 @@ from requests_futures.sessions import FuturesSession from urllib3.util import Retry # See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent. -USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0' +USER_AGENT = 'endoflife.date-bot/1.0 (endoflife.date automation; +https://endoflife.date/bot)' def fetch_urls(urls: list[str], data: any = None, headers: dict[str, str] = None,