projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fc09f0
)
[viu] Pass Referer and Origin headers (closes #16992)
author
Sergey M․
<dstftw@gmail.com>
Thu, 19 Jul 2018 17:01:43 +0000
(
00:01
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 19 Jul 2018 17:01:43 +0000
(
00:01
+0700)
youtube_dl/extractor/viu.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/viu.py
b/youtube_dl/extractor/viu.py
index 5cf93591cd0d863bb1f62968a0c25ea86e4cc744..e268f94093e2c9a24d69cc652f943f5d2c01584a 100644
(file)
--- 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', {})