1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-15 22:07:26 +00:00

minor fixes

This commit is contained in:
Yuval Hager 2021-01-26 00:44:23 -08:00
parent 5507979402
commit e3a900e707

View File

@ -9,7 +9,7 @@ from ..utils import unified_strdate, parse_duration
def get_thumbnail(data):
for media in data.get('media_group', []):
if media.get('type') == 'image':
for item in media.get('media_item'):
for item in media.get('media_item', []):
thumbnail = item.get('src')
if thumbnail:
return thumbnail
@ -53,11 +53,11 @@ class KanIE(InfoExtractor):
return {}
def _extract_list(self, list_id, webpage):
ids = re.findall(r'onclick="playVideo\(.*,\'([0-9]+)\'\)', webpage)
video_ids = re.findall(r'onclick="playVideo\(.*,\'([0-9]+)\'\)', webpage)
title = self._og_search_title(webpage)
description = self._og_search_description(webpage)
entries = []
for video_id in ids:
for video_id in video_ids:
url = 'https://www.kan.org.il/Item/?itemId=%s' % video_id
webpage = self._download_webpage(
url,