diff options
author | Remita Amine <remitamine@gmail.com> | 2021-03-02 12:04:31 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2021-03-02 12:04:31 +0100 |
commit | 8f56907afa693290a6b2e05fb7ffc2f15dca33e2 (patch) | |
tree | d7389117a3d49171833085f62f12e6c2a5963201 /youtube_dl/extractor/ninecninemedia.py | |
parent | e1adb3ed4fc911a8177280fe87109e7b54a52fa2 (diff) |
[9c9media] fix extraction for videos with multiple ContentPackages(closes #28309)
Diffstat (limited to 'youtube_dl/extractor/ninecninemedia.py')
-rw-r--r-- | youtube_dl/extractor/ninecninemedia.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/youtube_dl/extractor/ninecninemedia.py b/youtube_dl/extractor/ninecninemedia.py index a569c889e..cfc220314 100644 --- a/youtube_dl/extractor/ninecninemedia.py +++ b/youtube_dl/extractor/ninecninemedia.py @@ -23,11 +23,9 @@ class NineCNineMediaIE(InfoExtractor): destination_code, content_id = re.match(self._VALID_URL, url).groups() api_base_url = self._API_BASE_TEMPLATE % (destination_code, content_id) content = self._download_json(api_base_url, content_id, query={ - '$include': '[Media,Season,ContentPackages]', + '$include': '[Media.Name,Season,ContentPackages.Duration,ContentPackages.Id]', }) title = content['Name'] - if len(content['ContentPackages']) > 1: - raise ExtractorError('multiple content packages') content_package = content['ContentPackages'][0] package_id = content_package['Id'] content_package_url = api_base_url + 'contentpackages/%s/' % package_id |