1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-02-06 18:20:02 +00:00

[iqm2] Improve jwplayer_data regexp

Surprise! URLs can have parentheses in them, just like like @dstftw
reminded us in
001a30f335 (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...
This commit is contained in:
John Hawkinson 2016-10-18 00:00:11 -04:00
parent 02f4d4e44f
commit 3cd6469e36

View File

@ -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<options>[^)]+)\'\)', webpage)
mobj = re.search(r'SetupJWPlayer\(eval\(\'(?P<options>.+)\'\)\);', webpage)
if mobj:
return mobj.group('options')