aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/ard.py
diff options
context:
space:
mode:
authorOle Ernst <olebowle@gmx.com>2014-10-10 20:35:34 +0200
committerOle Ernst <olebowle@gmx.com>2014-10-10 20:35:34 +0200
commit3741302a109f28081a9db805a371c744f7bd2a2b (patch)
treec59496c6f8c26757bd79ebaa906296007b258b80 /youtube_dl/extractor/ard.py
parentc8e390c2b050e5fbe0a145ad4b621b2496020bab (diff)
[ard] Add rss support
Diffstat (limited to 'youtube_dl/extractor/ard.py')
-rw-r--r--youtube_dl/extractor/ard.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.py
index 8de9c11ea..cd9c1d9be 100644
--- a/youtube_dl/extractor/ard.py
+++ b/youtube_dl/extractor/ard.py
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
+from .generic import GenericIE
from ..utils import (
determine_ext,
ExtractorError,
@@ -12,6 +13,7 @@ from ..utils import (
parse_duration,
unified_strdate,
xpath_text,
+ parse_xml,
)
@@ -54,6 +56,11 @@ class ARDMediathekIE(InfoExtractor):
if '>Der gewünschte Beitrag ist nicht mehr verfügbar.<' in webpage:
raise ExtractorError('Video %s is no longer available' % video_id, expected=True)
+ if re.search(r'rss=true', url):
+ doc = parse_xml(webpage)
+ if doc.tag == 'rss':
+ return GenericIE()._extract_rss(url, video_id, doc)
+
title = self._html_search_regex(
[r'<h1(?:\s+class="boxTopHeadline")?>(.*?)</h1>',
r'<meta name="dcterms.title" content="(.*?)"/>',