From 11f6305c30fc0aa1e2107ec0f5d17dbc9c1d77b1 Mon Sep 17 00:00:00 2001 From: George ZED Date: Sun, 3 Nov 2024 00:22:59 +0200 Subject: [PATCH] Fix user-agent feature --- challonge/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challonge/api.py b/challonge/api.py index b04190f..4e16825 100644 --- a/challonge/api.py +++ b/challonge/api.py @@ -6,7 +6,7 @@ from httpx import HTTPStatusError tz = tzlocal.get_localzone() -user_agent = "pychallonge-1.11.5" +user_agent = "pychallonge" CHALLONGE_API_URL = "api.challonge.com/v1" @@ -100,6 +100,7 @@ def fetch(method, uri, params_prefix=None, timeout=30.0, **params): response = request( method, url, + headers={"User-Agent": user_agent}, auth=get_credentials(), timeout=timeout, **r_data