Fix incorrect url parsing and delint niconico.py
This commit is contained in:
parent
fbdf294dfd
commit
5703dfcc71
@ -483,13 +483,11 @@ class NiconicoSeriesIE(InfoExtractor):
|
|||||||
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',
|
||||||
@ -497,5 +495,3 @@ class NiconicoSeriesIE(InfoExtractor):
|
|||||||
'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