diff options
author | nyuszika7h <nyuszika7h@gmail.com> | 2021-11-19 02:49:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 07:19:51 +0530 |
commit | 6b993ca765753e0b04d65ec70cf787a2e9f94639 (patch) | |
tree | 5cc8d9576877890a7081e585d3cb2d3a93a2de3e /yt_dlp/extractor/common.py | |
parent | dd2a987d3f412dc61422ad13cf7b60920be8af6e (diff) | |
download | hypervideo-pre-6b993ca765753e0b04d65ec70cf787a2e9f94639.tar.lz hypervideo-pre-6b993ca765753e0b04d65ec70cf787a2e9f94639.tar.xz hypervideo-pre-6b993ca765753e0b04d65ec70cf787a2e9f94639.zip |
[hls] Better FairPlay DRM detection (#1661)
Authored by: nyuszika7h
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r-- | yt_dlp/extractor/common.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 6f0650296..a47364d07 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -2035,10 +2035,10 @@ class InfoExtractor(object): video_id=None): formats, subtitles = [], {} - if '#EXT-X-FAXS-CM:' in m3u8_doc: # Adobe Flash Access - return formats, subtitles - - has_drm = re.search(r'#EXT-X-(?:SESSION-)?KEY:.*?URI="skd://', m3u8_doc) + has_drm = re.search('|'.join([ + r'#EXT-X-FAXS-CM:', # Adobe Flash Access + r'#EXT-X-(?:SESSION-)?KEY:.*?URI="skd://', # Apple FairPlay + ]), m3u8_doc) def format_url(url): return url if re.match(r'^https?://', url) else compat_urlparse.urljoin(m3u8_url, url) |