From 5b088ccdd9ebb83ccd32a0a0a2cacd537fd2e03e Mon Sep 17 00:00:00 2001 From: deepspy Date: Wed, 3 Jul 2024 14:31:36 +0300 Subject: [PATCH] Fixed linter warnings. --- youtube_dl/extractor/kankids.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/youtube_dl/extractor/kankids.py b/youtube_dl/extractor/kankids.py index 1bcc1d025..397da5517 100644 --- a/youtube_dl/extractor/kankids.py +++ b/youtube_dl/extractor/kankids.py @@ -10,7 +10,7 @@ DOMAIN = r'kankids.org.il' class KanKidsIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?' +\ - DOMAIN.replace('.', '\.') + CONTENT_DIR +\ + DOMAIN.replace('.', '\\.') + CONTENT_DIR +\ r'(?P[a-z]+)-main/(?P[\w\-0-9]+)/(?P\w+)?/?$' _TESTS = [ { @@ -51,11 +51,11 @@ class KanKidsIE(InfoExtractor): season = playlist_season if playlist_season else r'(?P\w+)' content_dir = CONTENT_DIR + category + r'-main/' playlist = set(re.findall( - r'href="' + content_dir + # Content dir - series_id + r'/' + # Series - season + r'/' + # Season - r'(?P[0-9]+)/"' + # Episode - r'.+title="(?P.+)"', # Title + r'href="' + content_dir # Content dir + + series_id + r'/' # Series + + season + r'/' # Season + + r'(?P<id>[0-9]+)/"' # Episode + + r'.+title="(?P<title>.+)"', # Title webpage)) entries = [] @@ -74,4 +74,3 @@ class KanKidsIE(InfoExtractor): 'title': series_title, 'entries': entries, } -