From db63c10d4ed4def369d7284b0e603b2a9edec781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88?= Date: Wed, 27 Jan 2021 14:14:16 -0500 Subject: [PATCH] [ninjastream] Addressing coding convention issues --- youtube_dl/extractor/ninjastream.py | 43 ++++++++++++++++++----------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/youtube_dl/extractor/ninjastream.py b/youtube_dl/extractor/ninjastream.py index ef172f73a..b5929b645 100644 --- a/youtube_dl/extractor/ninjastream.py +++ b/youtube_dl/extractor/ninjastream.py @@ -28,39 +28,50 @@ class NinjaStreamIE(InfoExtractor): Parses the URL into the video's URL. """ # Parse the video id - video_id = self._search_regex(r'https?://(?:\w+\.)?ninjastream\.to/watch/([0-9a-zA-Z]+)', - url, 'video_id', fatal=False) or '' + video_id = self._search_regex( + r'https?://(?:\w+\.)?ninjastream\.to/watch/([0-9a-zA-Z]+)', + url, 'video_id', fatal=False, default='') # Get the hosted webpage webpage = self._download_webpage(url, video_id) - # The links to the m3u8 file will be buried and html encoded in the tag - jwplayer_link = self._html_search_regex(r' tag + jwplayer_link = self._html_search_regex( + r'