mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
parent
be8d623455
commit
3f4faff748
1 changed files with 7 additions and 3 deletions
|
@ -3991,12 +3991,16 @@ def filter_video(urls):
|
||||||
|
|
||||||
# here's a fun little line of code for you:
|
# here's a fun little line of code for you:
|
||||||
video_id = os.path.splitext(video_id)[0]
|
video_id = os.path.splitext(video_id)[0]
|
||||||
|
headers = {
|
||||||
|
'referer': full_response.geturl()
|
||||||
|
}
|
||||||
|
|
||||||
entry_info_dict = {
|
entry_info_dict = {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'uploader': video_uploader,
|
'uploader': video_uploader,
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
'age_limit': age_limit,
|
'age_limit': age_limit,
|
||||||
|
'http_headers': headers,
|
||||||
}
|
}
|
||||||
|
|
||||||
if RtmpIE.suitable(video_url):
|
if RtmpIE.suitable(video_url):
|
||||||
|
@ -4014,11 +4018,11 @@ def filter_video(urls):
|
||||||
elif ext == 'xspf':
|
elif ext == 'xspf':
|
||||||
return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
|
return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
|
||||||
elif ext == 'm3u8':
|
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':
|
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':
|
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:
|
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
|
# Just matching .ism/manifest is not enough to be reliably sure
|
||||||
# whether it's actually an ISM manifest or some other streaming
|
# whether it's actually an ISM manifest or some other streaming
|
||||||
|
|
Loading…
Reference in a new issue