From e2b6edae630c11d002e47bdd35ec88d39250cadb Mon Sep 17 00:00:00 2001 From: Nemo Date: Thu, 4 Jul 2024 10:44:29 +0530 Subject: [PATCH] fix url variable --- update.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update.py b/update.py index d315637..fc8c17f 100644 --- a/update.py +++ b/update.py @@ -44,7 +44,8 @@ def parse_redirect(kb_id, slug): } def get_url_slug(session, kb_id): - response = session.head(link, allow_redirects=False, timeout=5) + url = f"https://support.microsoft.com/help/{kb_id}" + response = session.head(url, allow_redirects=False, timeout=5) if 'location' in response.headers: l = response.headers['location'] return l.split('/')[-1]