From 1fb0e0399f62ad99104eb48f84d2c8f2de45b873 Mon Sep 17 00:00:00 2001 From: Henning Verbeek Date: Tue, 17 Sep 2024 08:54:32 +0200 Subject: [PATCH] Sets the default user-agent for all HTTP requests to bypass myjudo blocking scripts --- python/getjudo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/getjudo.py b/python/getjudo.py index b44000d..363d911 100644 --- a/python/getjudo.py +++ b/python/getjudo.py @@ -309,7 +309,8 @@ def judo_login(username, password): notification_topic = f"{config_getjudo.LOCATION}/{config_getjudo.NAME}/notify" client_id = f"{config_getjudo.NAME}-{config_getjudo.LOCATION}" -http = urllib3.PoolManager() +user_agent = {'user-agent':'Mozilla'} +http = urllib3.PoolManager(10, headers=user_agent) mydata = savedata()