aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-07-20 00:01:43 +0700
committerSergey M․ <dstftw@gmail.com>2018-07-20 00:01:43 +0700
commitc258570eddeafdef23221326e1961c81934f5297 (patch)
tree3935d53b278529c7df5f790a1ac7a5aeb3af8d31
parent6fc09f0155bae1fd0d3edf31111b37012875b6f2 (diff)
[viu] Pass Referer and Origin headers (closes #16992)
-rw-r--r--youtube_dl/extractor/viu.py3
1 files changed, 3 insertions, 0 deletions
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', {})