From 64d7552ff0b351dbaabce245c28326e4366016dd Mon Sep 17 00:00:00 2001 From: aaaaalbert Date: Thu, 29 Apr 2021 17:01:59 +0200 Subject: [PATCH] Make the download URL regexp more specific Backslash-escape additional dots for v2.0 and v2.3 URLs, and add a caret for v2.3 URLs. Note that the regexps before this commit will work just fine. They just match slightly too loosely. --- download.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.py b/download.py index d0de721..4294a61 100755 --- a/download.py +++ b/download.py @@ -11,11 +11,11 @@ class Downloader: def __init__(self, url, outdir): - m = re.match(r'^.*/playback/presentation/2\.0/playback.html\?meetingId=(\S+)$', url) + m = re.match(r'^.*/playback/presentation/2\.0/playback\.html\?meetingId=(\S+)$', url) if m is not None: id = m.group(1) else: - m = re.match(r'.*/playback/presentation/2.3/(\S+)$', url) + m = re.match(r'^.*/playback/presentation/2\.3/(\S+)$', url) if m is not None: id = m.group(1) else: