Browse Source

[ruutu] Detect DRM videos

totalwebcasting
Sergey M․ 8 years ago
parent
commit
db75f14d8a
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      youtube_dl/extractor/ruutu.py

+ 6
- 0
youtube_dl/extractor/ruutu.py View File

@ -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 {


Loading…
Cancel
Save