From 5d3c06ba9e15367703fa3382110a3e4d57488c92 Mon Sep 17 00:00:00 2001 From: grefog Date: Mon, 26 Aug 2019 15:44:38 -0600 Subject: [PATCH] Improve code hygiene after code review --- youtube_dl/extractor/niconico.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/youtube_dl/extractor/niconico.py b/youtube_dl/extractor/niconico.py index 3ad262e64..13e4195a4 100644 --- a/youtube_dl/extractor/niconico.py +++ b/youtube_dl/extractor/niconico.py @@ -23,6 +23,7 @@ from ..utils import ( unified_timestamp, urlencode_postdata, xpath_text, + urljoin, ) @@ -481,17 +482,18 @@ class NiconicoSeriesIE(InfoExtractor): 'playlist_mincount': 49, } def _real_extract(self, url): - series_id = url.split('/')[-1] + series_id = self._match_id(url) webpage = self._download_webpage(url, series_id) - entries = re.findall(r'(.*?)', webpage, 'title'), + 'title': self._search_regex(r'bodyTitle">(.*?)', webpage, 'title', fatal=False), }