projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b0d3ee
)
[ruutu] Detect DRM videos
author
Sergey M․
<dstftw@gmail.com>
Tue, 29 Nov 2016 21:19:38 +0000
(
04:19
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 29 Nov 2016 21:19:38 +0000
(
04:19
+0700)
youtube_dl/extractor/ruutu.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/ruutu.py
b/youtube_dl/extractor/ruutu.py
index 2fce4e81b7f44c4c70ff5e6e775a4743032a231b..6db3e3e9328b754f4a1f0ef149b33489857a3cd5 100644
(file)
--- a/
youtube_dl/extractor/ruutu.py
+++ b/
youtube_dl/extractor/ruutu.py
@@
-5,6
+5,7
@@
from .common import InfoExtractor
from ..compat import compat_urllib_parse_urlparse
from ..utils import (
determine_ext,
+ ExtractorError,
int_or_none,
xpath_attr,
xpath_text,
@@
-101,6
+102,11
@@
class RuutuIE(InfoExtractor):
})
extract_formats(video_xml.find('./Clip'))
+
+ drm = xpath_text(video_xml, './Clip/DRM', default=None)
+ if not formats and drm:
+ raise ExtractorError('This video is DRM protected.', expected=True)
+
self._sort_formats(formats)
return {