Fix incorrect url parsing and delint niconico.py
This commit is contained in:
parent
fbdf294dfd
commit
5703dfcc71
@ -476,26 +476,22 @@ class NiconicoSeriesIE(InfoExtractor):
|
|||||||
'url': 'https://www.nicovideo.jp/series/8253',
|
'url': 'https://www.nicovideo.jp/series/8253',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '8253',
|
'id': '8253',
|
||||||
'title' : '弦巻マキと結月ゆかりの未確認ゲーム日和',
|
'title': '弦巻マキと結月ゆかりの未確認ゲーム日和',
|
||||||
},
|
},
|
||||||
'playlist_mincount':49,
|
'playlist_mincount': 49,
|
||||||
}
|
}
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
series_id=url.split('/')[-1]
|
series_id = url.split('/')[-1]
|
||||||
webpage=self._download_webpage(url, series_id)
|
webpage = self._download_webpage(url, series_id)
|
||||||
entries=re.findall(r'(?<=<a href="\/watch\/)[^"]*',webpage)
|
entries = re.findall(r'<a href=["\'](\/watch\/[^"\']*)', webpage)
|
||||||
entries=[{
|
entries = [{
|
||||||
'_type':'url',
|
'_type': 'url',
|
||||||
'ie_key':NiconicoIE.ie_key(),
|
'ie_key': NiconicoIE.ie_key(),
|
||||||
|
'url': ('https://www.nicovideo.jp%s' % entry),
|
||||||
'url':('https://www.nicovideo.jp/watch/sm%s' %
|
|
||||||
entry),
|
|
||||||
} for entry in entries]
|
} for entry in entries]
|
||||||
return {
|
return {
|
||||||
'_type': 'playlist',
|
'_type': 'playlist',
|
||||||
'id': u'8253',
|
'id': u'8253',
|
||||||
'entries': entries,
|
'entries': entries,
|
||||||
'title': self._search_regex(r'bodyTitle">(.*?)</div>',webpage,'title'),
|
'title': self._search_regex(r'bodyTitle">(.*?)</div>', webpage, 'title'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user