1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-10 13:42:56 +08:00

[Gaskrank] fix for broken site. - requested fixes.

This commit is contained in:
motophil 2017-03-26 11:51:08 +02:00
parent 334fdb1922
commit cb1183729a

View File

@ -52,9 +52,8 @@ class GaskrankIE(InfoExtractor):
display_id = self._match_id(url) display_id = self._match_id(url)
webpage = self._download_webpage(url, display_id) webpage = self._download_webpage(url, display_id)
categories = [re.match(self._VALID_URL, url).group('categories')] categories = [re.match(self._VALID_URL, url).group('categories')]
title = self._search_regex( title = self._og_search_title(webpage, default=None) or self._html_search_meta(
r'<meta[^>]+itemprop\s*=\s*"name"[^>]+content\s*=\s*"([^"]+)"', 'title', webpage, fatal=True)
webpage, 'title')
mobj = re.search( mobj = re.search(
r'Video von:\s*(?P<uploader_id>[^|]*?)\s*\|\s*vom:\s*(?P<upload_date>[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9][0-9][0-9])', r'Video von:\s*(?P<uploader_id>[^|]*?)\s*\|\s*vom:\s*(?P<upload_date>[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9][0-9][0-9])',
@ -86,9 +85,7 @@ class GaskrankIE(InfoExtractor):
r'https?://movies\.gaskrank\.tv/([^-]*?)(-[^\.]*)?\.mp4', r'https?://movies\.gaskrank\.tv/([^-]*?)(-[^\.]*)?\.mp4',
webpage, 'video id') webpage, 'video id')
entries = self._parse_html5_media_entries(url, webpage, video_id) entry = self._parse_html5_media_entries(url, webpage, video_id)[0]
if entries:
for entry in entries:
entry.update({ entry.update({
'id': video_id, 'id': video_id,
'title': title, 'title': title,
@ -103,4 +100,4 @@ class GaskrankIE(InfoExtractor):
}) })
self._sort_formats(entry['formats']) self._sort_formats(entry['formats'])
return self.playlist_result(entries) return entry