Fix incorrect url parsing and delint niconico.py

This commit is contained in:
grefog 2019-08-24 13:41:10 -06:00
parent fbdf294dfd
commit 5703dfcc71

View File

@ -476,26 +476,22 @@ class NiconicoSeriesIE(InfoExtractor):
'url': 'https://www.nicovideo.jp/series/8253',
'info_dict': {
'id': '8253',
'title' : '弦巻マキと結月ゆかりの未確認ゲーム日和',
'title': '弦巻マキと結月ゆかりの未確認ゲーム日和',
},
'playlist_mincount':49,
'playlist_mincount': 49,
}
def _real_extract(self, url):
series_id=url.split('/')[-1]
webpage=self._download_webpage(url, series_id)
entries=re.findall(r'(?<=<a href="\/watch\/)[^"]*',webpage)
entries=[{
'_type':'url',
'ie_key':NiconicoIE.ie_key(),
'url':('https://www.nicovideo.jp/watch/sm%s' %
entry),
series_id = url.split('/')[-1]
webpage = self._download_webpage(url, series_id)
entries = re.findall(r'<a href=["\'](\/watch\/[^"\']*)', webpage)
entries = [{
'_type': 'url',
'ie_key': NiconicoIE.ie_key(),
'url': ('https://www.nicovideo.jp%s' % entry),
} for entry in entries]
return {
'_type': 'playlist',
'id': u'8253',
'entries': entries,
'title': self._search_regex(r'bodyTitle">(.*?)</div>',webpage,'title'),
'title': self._search_regex(r'bodyTitle">(.*?)</div>', webpage, 'title'),
}