aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-04-10 22:41:26 +0600
committerSergey M․ <dstftw@gmail.com>2015-04-10 22:44:33 +0600
commitd7c78decb0fb4adcf84e5e74cd0d4f858d48e2ee (patch)
treeb54324cee5fe8339baa4ceac5bc4495121052fff /youtube_dl
parent8749477ed0a3cbc85d1726b6526fa5e794ce6072 (diff)
[rai] Improve extraction
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/rai.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/youtube_dl/extractor/rai.py b/youtube_dl/extractor/rai.py
index 115cc64cc..12127c634 100644
--- a/youtube_dl/extractor/rai.py
+++ b/youtube_dl/extractor/rai.py
@@ -82,9 +82,9 @@ class RaiIE(InfoExtractor):
iframe_path = self._search_regex(
r'<iframe[^>]+src="/?(dl/[^"]+\?iframe\b[^"]*)"',
webpage, 'iframe')
- iframe_page = self._download_webpage(
+ webpage = self._download_webpage(
'%s/%s' % (host, iframe_path), video_id)
- relinker_url = self._extract_relinker_url(iframe_page)
+ relinker_url = self._extract_relinker_url(webpage)
relinker = self._download_json(
'%s&output=47' % relinker_url, video_id)
@@ -112,15 +112,15 @@ class RaiIE(InfoExtractor):
uploader = media.get('author')
upload_date = unified_strdate(media.get('date'))
else:
- title = self._search_regex(
- r'var\s+videoTitolo\s*=\s*"([^"]+)";',
- webpage, 'title', default=None) or self._og_search_title(webpage)
+ title = (self._search_regex(
+ r'var\s+videoTitolo\s*=\s*"(.+?)";',
+ webpage, 'title', default=None) or self._og_search_title(webpage)).replace('\\"', '"')
description = self._og_search_description(webpage)
thumbnail = self._og_search_thumbnail(webpage)
duration = None
uploader = self._html_search_meta('Editore', webpage, 'uploader')
upload_date = unified_strdate(self._html_search_meta(
- 'item-date', webpage, 'upload date'))
+ 'item-date', webpage, 'upload date', default=None))
subtitles = self.extract_subtitles(video_id, webpage)