mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 09:31:01 +01:00
parent
dd2a987d3f
commit
6b993ca765
@ -77,6 +77,15 @@ def real_download(self, filename, info_dict):
|
|||||||
message = ('The stream has AES-128 encryption and neither ffmpeg nor pycryptodomex are available; '
|
message = ('The stream has AES-128 encryption and neither ffmpeg nor pycryptodomex are available; '
|
||||||
'Decryption will be performed natively, but will be extremely slow')
|
'Decryption will be performed natively, but will be extremely slow')
|
||||||
if not can_download:
|
if not can_download:
|
||||||
|
has_drm = re.search('|'.join([
|
||||||
|
r'#EXT-X-FAXS-CM:', # Adobe Flash Access
|
||||||
|
r'#EXT-X-(?:SESSION-)?KEY:.*?URI="skd://', # Apple FairPlay
|
||||||
|
]), s)
|
||||||
|
if has_drm and not self.params.get('allow_unplayable_formats'):
|
||||||
|
self.report_error(
|
||||||
|
'This video is DRM protected; Try selecting another format with --format or '
|
||||||
|
'add --check-formats to automatically fallback to the next best format')
|
||||||
|
return False
|
||||||
message = message or 'Unsupported features have been detected'
|
message = message or 'Unsupported features have been detected'
|
||||||
fd = FFmpegFD(self.ydl, self.params)
|
fd = FFmpegFD(self.ydl, self.params)
|
||||||
self.report_warning(f'{message}; extraction will be delegated to {fd.get_basename()}')
|
self.report_warning(f'{message}; extraction will be delegated to {fd.get_basename()}')
|
||||||
|
@ -2035,10 +2035,10 @@ def _parse_m3u8_formats_and_subtitles(
|
|||||||
video_id=None):
|
video_id=None):
|
||||||
formats, subtitles = [], {}
|
formats, subtitles = [], {}
|
||||||
|
|
||||||
if '#EXT-X-FAXS-CM:' in m3u8_doc: # Adobe Flash Access
|
has_drm = re.search('|'.join([
|
||||||
return formats, subtitles
|
r'#EXT-X-FAXS-CM:', # Adobe Flash Access
|
||||||
|
r'#EXT-X-(?:SESSION-)?KEY:.*?URI="skd://', # Apple FairPlay
|
||||||
has_drm = re.search(r'#EXT-X-(?:SESSION-)?KEY:.*?URI="skd://', m3u8_doc)
|
]), m3u8_doc)
|
||||||
|
|
||||||
def format_url(url):
|
def format_url(url):
|
||||||
return url if re.match(r'^https?://', url) else compat_urlparse.urljoin(m3u8_url, url)
|
return url if re.match(r'^https?://', url) else compat_urlparse.urljoin(m3u8_url, url)
|
||||||
|
Loading…
Reference in New Issue
Block a user