1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-27 06:36:49 +01:00

[nickil] Improvements

This commit is contained in:
turicfr 2020-12-14 21:52:10 +02:00
parent 6a2342c7af
commit 3ecfa9f9f7

View File

@ -256,7 +256,7 @@ class NickRuIE(MTVServicesInfoExtractor):
class NickIlIE(InfoExtractor): class NickIlIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?nick\.co\.il/video/(?P<id>[0-9]+)' _VALID_URL = r'https?://(?:www\.)?nick\.co\.il/video/(?P<id>\d+)'
_TEST = { _TEST = {
'url': 'http://www.nick.co.il/video/17360', 'url': 'http://www.nick.co.il/video/17360',
'md5': '0974ad5949022e0477a5a28ee5b85634', 'md5': '0974ad5949022e0477a5a28ee5b85634',
@ -279,7 +279,7 @@ class NickIlIE(InfoExtractor):
}).get('items') }).get('items')
if items is None: if items is None:
raise ExtractorError('Unable to extract video data', expected=True, video_id=video_id) raise ExtractorError('Unable to extract video data', expected=True, video_id=video_id)
video = try_get([i for i in items if i.get('id') == int(video_id)] or None, lambda x: x[0], dict) video = try_get([i for i in items if i.get('id') == int(video_id)], lambda x: x[0], dict)
if video is None: if video is None:
raise ExtractorError('Unable to find video ID', expected=True, video_id=video_id) raise ExtractorError('Unable to find video ID', expected=True, video_id=video_id)
url = video.get('url') url = video.get('url')