summaryrefslogtreecommitdiffhomepage
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2016-11-30 04:19:38 +0700
committerSergey M․ <[email protected]>2016-11-30 04:19:38 +0700
commitdb75f14d8a6eb998f08d2774f5d609a02ef13646 (patch)
tree38c67d159c66d32868ff1303d227b5223a90f664 /youtube_dl
parent8b0d3ee64ee20de35d0828b01ece98f59bb19e1d (diff)
downloadyoutube-dl-db75f14d8a6eb998f08d2774f5d609a02ef13646.tar.gz
youtube-dl-db75f14d8a6eb998f08d2774f5d609a02ef13646.zip
[ruutu] Detect DRM videos
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/ruutu.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/ruutu.py b/youtube_dl/extractor/ruutu.py
index 2fce4e81b..6db3e3e93 100644
--- 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 {