From 3cd6469e364e23f6dd4ff6f322af707353ec2043 Mon Sep 17 00:00:00 2001 From: John Hawkinson Date: Tue, 18 Oct 2016 00:00:11 -0400 Subject: [PATCH] [iqm2] Improve jwplayer_data regexp Surprise! URLs can have parentheses in them, just like like @dstftw reminded us in https://github.com/rg3/youtube-dl/pull/10926/files/001a30f3352bcc829d8e6d4060af2a19cc2c4a82#r83538385 Use . instead of [^)] and anchor the regexp with \)\); at the end. Add an only_matching test case for this, although it may switch from realtime to processed in a few hours... --- youtube_dl/extractor/iqm2.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/iqm2.py b/youtube_dl/extractor/iqm2.py index 367aec9ff..c5576e5fd 100644 --- a/youtube_dl/extractor/iqm2.py +++ b/youtube_dl/extractor/iqm2.py @@ -56,10 +56,15 @@ class IQM2IE(JWPlatformBaseIE): { 'url': 'https://CambridgeMA.IQM2.com/Citizens/VideoMain.aspx?MeetingID=1679', 'only_matching': True, - }] + }, + { + 'url': 'https://CambridgeMA.IQM2.com/Citizens/VideoMain.aspx?MeetingID=1594', + 'only_matching': True, + } + ] def _find_jwplayer_data(self, webpage): - mobj = re.search(r'SetupJWPlayer\(eval\(\'(?P[^)]+)\'\)', webpage) + mobj = re.search(r'SetupJWPlayer\(eval\(\'(?P.+)\'\)\);', webpage) if mobj: return mobj.group('options')