aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/periscope.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-07-07 05:17:11 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-07-07 05:17:11 +0530
commit51f8a31d651ce7a7850ee5c5eec80a461f3d5ee9 (patch)
tree19876aa0ecf74521197779674bf6aa42d268026b /yt_dlp/extractor/periscope.py
parentbe05d5cff1e39252ca9c30fa5954de8717e1b8ea (diff)
downloadhypervideo-pre-51f8a31d651ce7a7850ee5c5eec80a461f3d5ee9.tar.lz
hypervideo-pre-51f8a31d651ce7a7850ee5c5eec80a461f3d5ee9.tar.xz
hypervideo-pre-51f8a31d651ce7a7850ee5c5eec80a461f3d5ee9.zip
Update to ytdl-commit-a803582
[peertube] only call description endpoint if necessary https://github.com/ytdl-org/youtube-dl/commit/a8035827177d6b59aca03bd717acb6a9bdd75ada
Diffstat (limited to 'yt_dlp/extractor/periscope.py')
-rw-r--r--yt_dlp/extractor/periscope.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/yt_dlp/extractor/periscope.py b/yt_dlp/extractor/periscope.py
index b15906390..b93a02b7d 100644
--- a/yt_dlp/extractor/periscope.py
+++ b/yt_dlp/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