2024-05-20 10:22:40 -05:00
|
|
|
|
from .sheeta import SheetaEmbedIE
|
2023-09-23 17:36:34 -05:00
|
|
|
|
|
|
|
|
|
|
2024-05-20 10:22:40 -05:00
|
|
|
|
class NiconicoChannelPlusIE(SheetaEmbedIE):
|
2023-09-23 17:36:34 -05:00
|
|
|
|
IE_NAME = 'NiconicoChannelPlus'
|
|
|
|
|
IE_DESC = 'ニコニコチャンネルプラス'
|
|
|
|
|
_VALID_URL = r'https?://nicochannel\.jp/(?P<channel>[\w.-]+)/(?:video|live)/(?P<code>sm\w+)'
|
|
|
|
|
_TESTS = [{
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'url': 'https://nicochannel.jp/kaorin/video/sm89Hd4SEduy8WTsb4KxAhBL',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'sm89Hd4SEduy8WTsb4KxAhBL',
|
|
|
|
|
'title': '前田佳織里の世界攻略計画 #2',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'ext': 'mp4',
|
|
|
|
|
'channel': '前田佳織里の世界攻略計画',
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'channel_id': 'nicochannel.jp/kaorin',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'channel_url': 'https://nicochannel.jp/kaorin',
|
|
|
|
|
'live_status': 'not_live',
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'thumbnail': str,
|
|
|
|
|
'description': 'md5:02573495c8be849c0cb88df6f1b85f8b',
|
|
|
|
|
'timestamp': 1644546015,
|
|
|
|
|
'duration': 4093,
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'comment_count': int,
|
|
|
|
|
'view_count': int,
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'tags': ['前田攻略', '前田佳織里', '前田佳織里の世界攻略計画'],
|
|
|
|
|
'upload_date': '20220211',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
},
|
|
|
|
|
'params': {
|
|
|
|
|
'skip_download': True,
|
|
|
|
|
},
|
|
|
|
|
}, {
|
|
|
|
|
# age limited video; test purpose channel.
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'url': 'https://nicochannel.jp/testman/video/smJPZg3nwAxP8UECPsHDiCGM',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'smJPZg3nwAxP8UECPsHDiCGM',
|
|
|
|
|
'title': 'DW_itaba_LSM検証_1080p60fps_9000Kbpsで打ち上げたときの挙動確認(パススルーあり)',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'ext': 'mp4',
|
|
|
|
|
'channel': '本番チャンネルプラステストマン',
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'channel_id': 'nicochannel.jp/testman',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'channel_url': 'https://nicochannel.jp/testman',
|
|
|
|
|
'age_limit': 18,
|
|
|
|
|
'live_status': 'was_live',
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'thumbnail': str,
|
|
|
|
|
'description': 'TEST',
|
|
|
|
|
'timestamp': 1701329428,
|
|
|
|
|
'duration': 229,
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'comment_count': int,
|
|
|
|
|
'view_count': int,
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'tags': ['検証用'],
|
|
|
|
|
'upload_date': '20231130',
|
|
|
|
|
'release_timestamp': 1701328800,
|
|
|
|
|
'release_date': '20231130',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
},
|
|
|
|
|
'params': {
|
|
|
|
|
'skip_download': True,
|
|
|
|
|
},
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2024-05-20 10:22:40 -05:00
|
|
|
|
return super()._extract_from_url(url)
|
2023-09-23 17:36:34 -05:00
|
|
|
|
|
|
|
|
|
|
2024-05-20 10:22:40 -05:00
|
|
|
|
class NiconicoChannelPlusChannelVideosIE(SheetaEmbedIE):
|
2023-09-23 17:36:34 -05:00
|
|
|
|
IE_NAME = 'NiconicoChannelPlus:channel:videos'
|
|
|
|
|
IE_DESC = 'ニコニコチャンネルプラス - チャンネル - 動画リスト. nicochannel.jp/channel/videos'
|
|
|
|
|
_VALID_URL = r'https?://nicochannel\.jp/(?P<id>[a-z\d\._-]+)/videos(?:\?.*)?'
|
|
|
|
|
_TESTS = [{
|
|
|
|
|
# query: None
|
|
|
|
|
'url': 'https://nicochannel.jp/testman/videos',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testman/videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': '本番チャンネルプラステストマン-videos',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 18,
|
|
|
|
|
}, {
|
|
|
|
|
# query: None
|
|
|
|
|
'url': 'https://nicochannel.jp/testtarou/videos',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testtarou/videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': 'チャンネルプラステスト太郎-videos',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 2,
|
|
|
|
|
}, {
|
|
|
|
|
# query: None
|
|
|
|
|
'url': 'https://nicochannel.jp/testjirou/videos',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testjirou/videos',
|
|
|
|
|
'title': 'チャンネルプラステスト二郎21-videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 12,
|
|
|
|
|
}, {
|
|
|
|
|
# query: tag
|
|
|
|
|
'url': 'https://nicochannel.jp/testman/videos?tag=%E6%A4%9C%E8%A8%BC%E7%94%A8',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testman/videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': '本番チャンネルプラステストマン-videos',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 6,
|
|
|
|
|
}, {
|
|
|
|
|
# query: vodType
|
|
|
|
|
'url': 'https://nicochannel.jp/testman/videos?vodType=1',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testman/videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': '本番チャンネルプラステストマン-videos',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 18,
|
|
|
|
|
}, {
|
|
|
|
|
# query: sort
|
|
|
|
|
'url': 'https://nicochannel.jp/testman/videos?sort=-released_at',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testman/videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': '本番チャンネルプラステストマン-videos',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 18,
|
|
|
|
|
}, {
|
|
|
|
|
# query: tag, vodType
|
|
|
|
|
'url': 'https://nicochannel.jp/testman/videos?tag=%E6%A4%9C%E8%A8%BC%E7%94%A8&vodType=1',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testman/videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': '本番チャンネルプラステストマン-videos',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 6,
|
|
|
|
|
}, {
|
|
|
|
|
# query: tag, sort
|
|
|
|
|
'url': 'https://nicochannel.jp/testman/videos?tag=%E6%A4%9C%E8%A8%BC%E7%94%A8&sort=-released_at',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testman/videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': '本番チャンネルプラステストマン-videos',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 6,
|
|
|
|
|
}, {
|
|
|
|
|
# query: vodType, sort
|
|
|
|
|
'url': 'https://nicochannel.jp/testman/videos?vodType=1&sort=-released_at',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testman/videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': '本番チャンネルプラステストマン-videos',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 18,
|
|
|
|
|
}, {
|
|
|
|
|
# query: tag, vodType, sort
|
|
|
|
|
'url': 'https://nicochannel.jp/testman/videos?tag=%E6%A4%9C%E8%A8%BC%E7%94%A8&vodType=1&sort=-released_at',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testman/videos',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': '本番チャンネルプラステストマン-videos',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 6,
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2024-05-20 10:22:40 -05:00
|
|
|
|
return super()._extract_from_url(url)
|
2023-09-23 17:36:34 -05:00
|
|
|
|
|
|
|
|
|
|
2024-05-20 10:22:40 -05:00
|
|
|
|
class NiconicoChannelPlusChannelLivesIE(SheetaEmbedIE):
|
2023-09-23 17:36:34 -05:00
|
|
|
|
IE_NAME = 'NiconicoChannelPlus:channel:lives'
|
|
|
|
|
IE_DESC = 'ニコニコチャンネルプラス - チャンネル - ライブリスト. nicochannel.jp/channel/lives'
|
|
|
|
|
_VALID_URL = r'https?://nicochannel\.jp/(?P<id>[a-z\d\._-]+)/lives'
|
|
|
|
|
_TESTS = [{
|
|
|
|
|
'url': 'https://nicochannel.jp/testman/lives',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testman/lives',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': '本番チャンネルプラステストマン-lives',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 18,
|
|
|
|
|
}, {
|
|
|
|
|
'url': 'https://nicochannel.jp/testtarou/lives',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testtarou/lives',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
'title': 'チャンネルプラステスト太郎-lives',
|
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 2,
|
|
|
|
|
}, {
|
|
|
|
|
'url': 'https://nicochannel.jp/testjirou/lives',
|
|
|
|
|
'info_dict': {
|
2024-05-20 10:22:40 -05:00
|
|
|
|
'id': 'nicochannel.jp/testjirou/lives',
|
|
|
|
|
'title': 'チャンネルプラステスト二郎21-lives',
|
2023-09-23 17:36:34 -05:00
|
|
|
|
},
|
|
|
|
|
'playlist_mincount': 6,
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2024-05-20 10:22:40 -05:00
|
|
|
|
return super()._extract_from_url(url)
|