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:
parent
02f4d4e44f
commit
3cd6469e36
@ -56,10 +56,15 @@ class IQM2IE(JWPlatformBaseIE):
|
|||||||
{
|
{
|
||||||
'url': 'https://CambridgeMA.IQM2.com/Citizens/VideoMain.aspx?MeetingID=1679',
|
'url': 'https://CambridgeMA.IQM2.com/Citizens/VideoMain.aspx?MeetingID=1679',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
}]
|
},
|
||||||
|
{
|
||||||
|
'url': 'https://CambridgeMA.IQM2.com/Citizens/VideoMain.aspx?MeetingID=1594',
|
||||||
|
'only_matching': True,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
def _find_jwplayer_data(self, webpage):
|
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:
|
if mobj:
|
||||||
return mobj.group('options')
|
return mobj.group('options')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user