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...
Out of @yan12125's concern that the presumption that JWPlayer data as
an array representing multiple formats rather than a playlist might be
specific to IQM2, move this code from jwplatform.py to iqm2.py.
JWPlatformBase now reverts to throwing a TypeError if it gets an
array.
Now IQM2 redefines the _extract_jwplayer_data() method as well, but it
continues to leverage JWPlatformBase for _parse_jwplayer_data(), which
is the bulk of the work.
Video IDs should be based on the unique ID of the video, not the
meeting ID of the parent page that links to the media
page. Unfortunately we don't learn the media ID until after
downloading the first page.
Per @yan12125's suggestion:
* Redefine _find_jwplayer_data() to use the SetupJWPlayer RE that's IQM2-specific
* Retreive the 2ndary webpage on our own
* Search for the title just like generic does
* If our parsed JSON ends up as a list, rather than a dict, then store
it in ['sources'] as that list, rather than trying to wrap it in an
array, which leads to type errors. (Such a list indicates multiple
file formats/sources, rather than a playlist.)
* Allow format labels like 'SD 480' and 'HD 720' in addition to '1080p'
Oops, when I created this extractor I copied the sample code from the
2014 manpage on my system, thus missing 4bc77c8417ca0340d09dcebb311d06aa7d5ba0ac's
introduction of the _match_id() helper function.