fix trailing parentheses

This commit is contained in:
Yuval Hager 2021-05-18 18:17:43 -07:00
parent 440aba21de
commit 279539e995

View File

@ -8,8 +8,7 @@ from ..utils import (
ExtractorError, ExtractorError,
parse_duration, parse_duration,
try_get, try_get,
unified_strdate, unified_strdate)
)
def get_thumbnail(data): def get_thumbnail(data):
@ -35,10 +34,8 @@ class KanBaseIE(InfoExtractor):
self._search_regex( self._search_regex(
r'<script[^>]+id="kan_app_search_data"[^>]*>([^<]+)</script>', r'<script[^>]+id="kan_app_search_data"[^>]*>([^<]+)</script>',
webpage, webpage,
'data', 'data'),
), video_id)
video_id,
)
title = data.get('title') or self._og_search_title(webpage) title = data.get('title') or self._og_search_title(webpage)
m3u8_url = try_get(data, lambda x: x['content']['src'], compat_str) m3u8_url = try_get(data, lambda x: x['content']['src'], compat_str)
formats = self._extract_m3u8_formats(m3u8_url, video_id, ext='mp4') formats = self._extract_m3u8_formats(m3u8_url, video_id, ext='mp4')
@ -106,8 +103,7 @@ class KanPlaylistIE(KanBaseIE):
video_url = 'https://www.kan.org.il/Item/?itemId=%s' % video_id video_url = 'https://www.kan.org.il/Item/?itemId=%s' % video_id
entries.append(self.extract_item( entries.append(self.extract_item(
video_id, video_id,
self.download_webpage(video_url, video_id)) self.download_webpage(video_url, video_id)))
)
if not entries: if not entries:
raise ExtractorError('Unable to extract playlist entries') raise ExtractorError('Unable to extract playlist entries')