mirror of
https://github.com/captn3m0/microsoft-kb-metadata.git
synced 2024-09-16 10:16:06 +00:00
fix url variable
This commit is contained in:
parent
0157806e83
commit
e2b6edae63
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user