[NiconicoPlaylist] Addition of niconico login function, to allow private mylist access. Test still needs work.
This commit is contained in:
parent
6db03a29d1
commit
bd6aba10c6
@ -438,15 +438,27 @@ class NiconicoIE(InfoExtractor):
|
|||||||
|
|
||||||
class NiconicoPlaylistIE(InfoExtractor):
|
class NiconicoPlaylistIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?nicovideo\.jp/mylist/(?P<id>\d+)'
|
_VALID_URL = r'https?://(?:www\.)?nicovideo\.jp/mylist/(?P<id>\d+)'
|
||||||
|
_NETRC_MACHINE = 'niconico'
|
||||||
|
|
||||||
_TEST = {
|
_TESTS = [{
|
||||||
'url': 'http://www.nicovideo.jp/mylist/27411728',
|
'url': 'http://www.nicovideo.jp/mylist/27411728',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '27411728',
|
'id': '27411728',
|
||||||
'title': 'AKB48のオールナイトニッポン',
|
'title': 'AKB48のオールナイトニッポン',
|
||||||
},
|
},
|
||||||
'playlist_mincount': 225,
|
'playlist_mincount': 225,
|
||||||
}
|
}, {
|
||||||
|
'url': 'https://www.nicovideo.jp/mylist/64988008',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '64988008',
|
||||||
|
'title': 'Private_Mylist_Test',
|
||||||
|
},
|
||||||
|
'playlist_mincount': 2,
|
||||||
|
}]
|
||||||
|
|
||||||
|
# Add support for private mylist access by owner via log-in
|
||||||
|
def _real_initialize(self):
|
||||||
|
NiconicoIE._login(self)
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
list_id = self._match_id(url)
|
list_id = self._match_id(url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user