Browse Source

[viu] Pass Referer and Origin headers (closes #16992)

master-ytdl-org
Sergey M․ 6 years ago
parent
commit
c258570edd
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      youtube_dl/extractor/viu.py

+ 3
- 0
youtube_dl/extractor/viu.py View File

@ -214,6 +214,9 @@ class ViuOTTIE(InfoExtractor):
'https://d1k2us671qcoau.cloudfront.net/distribute_web_%s.php' % country_code, 'https://d1k2us671qcoau.cloudfront.net/distribute_web_%s.php' % country_code,
video_id, 'Downloading stream info', query={ video_id, 'Downloading stream info', query={
'ccs_product_id': video_data['ccs_product_id'], 'ccs_product_id': video_data['ccs_product_id'],
}, headers={
'Referer': url,
'Origin': re.search(r'https?://[^/]+', url).group(0),
})['data']['stream'] })['data']['stream']
stream_sizes = stream_data.get('size', {}) stream_sizes = stream_data.get('size', {})


Loading…
Cancel
Save