From 3ecfa9f9f79bf570b24b4d82ab909e10f14cee67 Mon Sep 17 00:00:00 2001 From: turicfr Date: Mon, 14 Dec 2020 21:52:10 +0200 Subject: [PATCH] [nickil] Improvements --- youtube_dl/extractor/nick.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/nick.py b/youtube_dl/extractor/nick.py index b86bb20f6..3ce6dd922 100644 --- a/youtube_dl/extractor/nick.py +++ b/youtube_dl/extractor/nick.py @@ -256,7 +256,7 @@ class NickRuIE(MTVServicesInfoExtractor): class NickIlIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?nick\.co\.il/video/(?P[0-9]+)' + _VALID_URL = r'https?://(?:www\.)?nick\.co\.il/video/(?P\d+)' _TEST = { 'url': 'http://www.nick.co.il/video/17360', 'md5': '0974ad5949022e0477a5a28ee5b85634', @@ -279,7 +279,7 @@ class NickIlIE(InfoExtractor): }).get('items') if items is None: 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: raise ExtractorError('Unable to find video ID', expected=True, video_id=video_id) url = video.get('url')