mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-30 00:26:24 +00:00
[ellentv] Fix extraction
This commit is contained in:
parent
5090d93f2c
commit
2ad978532b
@ -39,24 +39,20 @@ class EllenTVIE(InfoExtractor):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(
|
||||||
|
'http://widgets.ellentube.com/videos/%s' % video_id,
|
||||||
|
video_id)
|
||||||
|
|
||||||
video_url = self._html_search_meta('VideoURL', webpage, 'url', fatal=True)
|
partner_id = self._search_regex(
|
||||||
title = self._og_search_title(webpage, default=None) or self._search_regex(
|
r"var\s+partnerId\s*=\s*'([^']+)", webpage, 'partner id')
|
||||||
r'pageName\s*=\s*"([^"]+)"', webpage, 'title')
|
|
||||||
description = self._html_search_meta(
|
|
||||||
'description', webpage, 'description') or self._og_search_description(webpage)
|
|
||||||
timestamp = parse_iso8601(self._search_regex(
|
|
||||||
r'<span class="publish-date"><time datetime="([^"]+)">',
|
|
||||||
webpage, 'timestamp', fatal=False))
|
|
||||||
|
|
||||||
return {
|
kaltura_id = self._search_regex(
|
||||||
'id': video_id,
|
[r'id="kaltura_player_([^"]+)"',
|
||||||
'url': video_url,
|
r"_wb_entry_id\s*:\s*'([^']+)",
|
||||||
'title': title,
|
r'data-kaltura-entry-id="([^"]+)'],
|
||||||
'description': description,
|
webpage, 'kaltura id')
|
||||||
'timestamp': timestamp,
|
|
||||||
}
|
return self.url_result('kaltura:%s:%s' % (partner_id, kaltura_id), 'Kaltura')
|
||||||
|
|
||||||
|
|
||||||
class EllenTVClipsIE(InfoExtractor):
|
class EllenTVClipsIE(InfoExtractor):
|
||||||
|
Loading…
Reference in New Issue
Block a user