1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-29 13:42:37 +00:00

[tmz] Simplify (#4304)

This commit is contained in:
Philipp Hagemeister 2014-11-25 09:16:40 +01:00
parent f0c3d729d7
commit c553fe5d29

View file

@ -21,19 +21,12 @@ class TMZIE(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(url, video_id)
url = self._html_search_regex(r'<meta name="VideoURL" content="(.+)"', webpage, 'url')
title = self._html_search_regex(r'<meta property="og:title" content="(.+)"', webpage, 'title')
description = self._html_search_regex(r'<meta property="og:description" content="(.+)"', webpage, 'description')
thumbnail_url = self._html_search_regex(r'<meta name="ThumbURL" content="(.+)"', webpage, 'thumbnail url')
return { return {
'id': video_id, 'id': video_id,
'url': url, 'url': self._html_search_meta('VideoURL', webpage, fatal=True),
'ext': 'mp4', 'title': self._og_search_title(webpage),
'title': title, 'description': self._og_search_description(webpage),
'description': description, 'thumbnail': self._html_search_meta('ThumbURL', webpage),
'thumbnail': thumbnail_url,
} }