diff options
author | Jesús <heckyel@hyperbola.info> | 2022-02-22 10:56:37 +0800 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-02-22 10:56:37 +0800 |
commit | 21cc56c6e71361ccf17cebb6b131113501815ae6 (patch) | |
tree | d7d490b56632f3f534fb80b610268c16d89dda7f /yt_dlp/extractor/generic.py | |
parent | c7a54bcfbd27dde89c6267b42da7de8ea5625be1 (diff) | |
parent | 4d4f9a029f8aebd06bcd98ca61e7629de47e0018 (diff) | |
download | hypervideo-pre-21cc56c6e71361ccf17cebb6b131113501815ae6.tar.lz hypervideo-pre-21cc56c6e71361ccf17cebb6b131113501815ae6.tar.xz hypervideo-pre-21cc56c6e71361ccf17cebb6b131113501815ae6.zip |
updated from upstream | 22/02/2022 at 10:56
Diffstat (limited to 'yt_dlp/extractor/generic.py')
-rw-r--r-- | yt_dlp/extractor/generic.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.py index baedd7948..d975e4bdb 100644 --- a/yt_dlp/extractor/generic.py +++ b/yt_dlp/extractor/generic.py @@ -3991,12 +3991,16 @@ class GenericIE(InfoExtractor): # here's a fun little line of code for you: video_id = os.path.splitext(video_id)[0] + headers = { + 'referer': full_response.geturl() + } entry_info_dict = { 'id': video_id, 'uploader': video_uploader, 'title': video_title, 'age_limit': age_limit, + 'http_headers': headers, } if RtmpIE.suitable(video_url): @@ -4014,11 +4018,11 @@ class GenericIE(InfoExtractor): elif ext == 'xspf': return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id) elif ext == 'm3u8': - entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(video_url, video_id, ext='mp4') + entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_m3u8_formats_and_subtitles(video_url, video_id, ext='mp4', headers=headers) elif ext == 'mpd': - entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_mpd_formats_and_subtitles(video_url, video_id) + entry_info_dict['formats'], entry_info_dict['subtitles'] = self._extract_mpd_formats_and_subtitles(video_url, video_id, headers=headers) elif ext == 'f4m': - entry_info_dict['formats'] = self._extract_f4m_formats(video_url, video_id) + entry_info_dict['formats'] = self._extract_f4m_formats(video_url, video_id, headers=headers) elif re.search(r'(?i)\.(?:ism|smil)/manifest', video_url) and video_url != url: # Just matching .ism/manifest is not enough to be reliably sure # whether it's actually an ISM manifest or some other streaming |