From: Sergey M․ Date: Thu, 19 Jul 2018 17:01:43 +0000 (+0700) Subject: [viu] Pass Referer and Origin headers (closes #16992) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=c258570eddeafdef23221326e1961c81934f5297;p=youtube-dl [viu] Pass Referer and Origin headers (closes #16992) --- diff --git a/youtube_dl/extractor/viu.py b/youtube_dl/extractor/viu.py index 5cf93591c..e268f9409 100644 --- a/youtube_dl/extractor/viu.py +++ b/youtube_dl/extractor/viu.py @@ -214,6 +214,9 @@ class ViuOTTIE(InfoExtractor): 'https://d1k2us671qcoau.cloudfront.net/distribute_web_%s.php' % country_code, video_id, 'Downloading stream info', query={ 'ccs_product_id': video_data['ccs_product_id'], + }, headers={ + 'Referer': url, + 'Origin': re.search(r'https?://[^/]+', url).group(0), })['data']['stream'] stream_sizes = stream_data.get('size', {})