-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rai] drm check and fix #27657
[rai] drm check and fix #27657
Conversation
Read coding conventions. |
reviewed by @pukkandan (yt-dlp/yt-dlp#150) Authored by: nixxo <nixxo@protonmail.com>
reviewed by @pukkandan (yt-dlp/yt-dlp#150)
Is this still relevant? |
no, it can be closed. |
Thx |
@dirkf sorry, my mistake. Sorry again. |
The linked issue was marked as fixed in fcd90d2 (your #27673) but Sergey didn't merge this change. I distilled it to this 9e5ca66: --- a/youtube_dl/extractor/rai.py
+++ b/youtube_dl/extractor/rai.py
@@ -158,6 +158,10 @@ class RaiPlayIE(RaiBaseIE):
# subtitles at 'subtitlesArray' key (see #27698)
'url': 'https://www.raiplay.it/video/2020/12/Report---04-01-2021-2e90f1de-8eee-4de4-ac0e-78d21db5b600.html',
'only_matching': True,
+ }, {
+ # DRM protected
+ 'url': 'https://www.raiplay.it/video/2020/09/Lo-straordinario-mondo-di-Zoey-S1E1-Lo-straordinario-potere-di-Zoey-ed493918-1d32-44b7-8454-862e473d00ff.html',
+ 'only_matching': True,
}]
def _real_extract(self, url):
@@ -166,6 +170,13 @@ class RaiPlayIE(RaiBaseIE):
media = self._download_json(
base + '.json', video_id, 'Downloading video JSON')
+ if try_get(
+ media,
+ (lambda x: x['rights_management']['rights']['drm'],
+ lambda x: x['program_info']['rights_management']['rights']['drm']),
+ dict):
+ raise ExtractorError('This video is DRM protected.', expected=True)
+
title = media['name']
video = media['video'] |
dstftw asked me to split the PR in 2 because it fixed two different problems (see here: #27657 (comment)) and so I did (#27657 #27673) but then he only merged one leaving this one un-merged. |
reviewed by pukkandan (yt-dlp/yt-dlp#150)
reviewed by pukkandan (yt-dlp/yt-dlp#150)
reviewed by pukkandan (yt-dlp/yt-dlp#150)
* https://github.com/ytdl-org/youtube-dl: [RAI] Fix extraction of http formats [RAI] Extend formats with direct http mp4 link (PR ytdl-org#27990) [RAI] Added checks for DRM protected content (PR ytdl-org#27657)
* commit '871645a4a4a0e12ec8f7bf78a3ad7bf75838ee5c': [RAI] Fix extraction of http formats [RAI] Extend formats with direct http mp4 link (PR ytdl-org#27990) [RAI] Added checks for DRM protected content (PR ytdl-org#27657)
reviewed by pukkandan (yt-dlp/yt-dlp#150)
reviewed by pukkandan (yt-dlp/yt-dlp#150)
Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information