From 3e942647a7927d343e77ff5b876954cf6956ea1d Mon Sep 17 00:00:00 2001 From: panda130 <70740721+panda130@users.noreply.github.com> Date: Sat, 26 Sep 2020 16:42:01 -0700 Subject: [PATCH 1/2] Update viu.py Fixes Viu ott video extraction by adding 'language_flag_id' and 'ut' to the query. Closes #26701 --- youtube_dl/extractor/viu.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/viu.py b/youtube_dl/extractor/viu.py index 3bd37525b..074d0868f 100644 --- a/youtube_dl/extractor/viu.py +++ b/youtube_dl/extractor/viu.py @@ -208,7 +208,9 @@ class ViuOTTIE(InfoExtractor): query = { 'r': 'vod/ajax-detail', 'platform_flag_label': 'web', + 'language_flag_id': 3, 'product_id': video_id, + 'ut': 2, } area_id = self._AREA_ID.get(country_code.upper()) @@ -226,7 +228,7 @@ class ViuOTTIE(InfoExtractor): stream_data = self._download_json( 'https://d1k2us671qcoau.cloudfront.net/distribute_web_%s.php' % country_code, video_id, 'Downloading stream info', query={ - 'ccs_product_id': video_data['ccs_product_id'], + 'ccs_product_id': video_data['ccs_product_id'], 'language_flag_id': 3, }, headers={ 'Referer': url, 'Origin': re.search(r'https?://[^/]+', url).group(0), From ef8b06469e8dd9783cd05089ed039b958a71e497 Mon Sep 17 00:00:00 2001 From: panda130 <70740721+panda130@users.noreply.github.com> Date: Sun, 27 Sep 2020 13:45:59 -0700 Subject: [PATCH 2/2] Update viu.py --- youtube_dl/extractor/viu.py | 1 - 1 file changed, 1 deletion(-) diff --git a/youtube_dl/extractor/viu.py b/youtube_dl/extractor/viu.py index 074d0868f..b7422e909 100644 --- a/youtube_dl/extractor/viu.py +++ b/youtube_dl/extractor/viu.py @@ -210,7 +210,6 @@ class ViuOTTIE(InfoExtractor): 'platform_flag_label': 'web', 'language_flag_id': 3, 'product_id': video_id, - 'ut': 2, } area_id = self._AREA_ID.get(country_code.upper())