aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-06-29 19:27:01 -0500
committerJesús <heckyel@hyperbola.info>2021-06-29 19:27:01 -0500
commita7c421ce9f18e4feb4e5a407ebc1862782df0257 (patch)
tree8244017ed2a9e0dd26e3fdcd2bea0824eeb58835
parent686b215b741f888475f3608a5dc58ef28aa5e163 (diff)
parent7fb9564420d43252c8f8c453d4dc54bf3ff9f8ee (diff)
downloadhypervideo-pre-a7c421ce9f18e4feb4e5a407ebc1862782df0257.tar.lz
hypervideo-pre-a7c421ce9f18e4feb4e5a407ebc1862782df0257.tar.xz
hypervideo-pre-a7c421ce9f18e4feb4e5a407ebc1862782df0257.zip
updated from upstream | 29/06/2021 at 19:26
-rw-r--r--youtube_dl/extractor/periscope.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/periscope.py b/youtube_dl/extractor/periscope.py
index b15906390..b93a02b7d 100644
--- a/youtube_dl/extractor/periscope.py
+++ b/youtube_dl/extractor/periscope.py
@@ -12,6 +12,10 @@ from ..utils import (
class PeriscopeBaseIE(InfoExtractor):
+ _M3U8_HEADERS = {
+ 'Referer': 'https://www.periscope.tv/'
+ }
+
def _call_api(self, method, query, item_id):
return self._download_json(
'https://api.periscope.tv/api/v2/%s' % method,
@@ -54,9 +58,11 @@ class PeriscopeBaseIE(InfoExtractor):
m3u8_url, video_id, 'mp4',
entry_protocol='m3u8_native'
if state in ('ended', 'timed_out') else 'm3u8',
- m3u8_id=format_id, fatal=fatal)
+ m3u8_id=format_id, fatal=fatal, headers=self._M3U8_HEADERS)
if len(m3u8_formats) == 1:
self._add_width_and_height(m3u8_formats[0], width, height)
+ for f in m3u8_formats:
+ f.setdefault('http_headers', {}).update(self._M3U8_HEADERS)
return m3u8_formats