Compare commits

...

2 Commits

Author SHA1 Message Date
Mozi
283152b1d0 [extractor/niconicochannelplus] add sanity check for "--extractor-args"
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
2023-09-23 10:36:45 +08:00
Mozi
0ac68ff225 [extractor/niconicochannelplus] "write_debug" debug info
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
2023-09-23 10:29:51 +08:00

View File

@ -167,7 +167,7 @@ class NiconicoChannelPlusIE(NiconicoChannelPlusBaseIE):
headers={'Content-Type': 'application/json'},
query={
'sort_direction': 'asc',
'limit': traverse_obj(self._configuration_arg('max_comments', [120]), (0, )),
'limit': int_or_none(self._configuration_arg('max_comments', [''])[0]) or 120,
},
data=json.dumps({
'token': comment_access_token,
@ -217,7 +217,7 @@ class NiconicoChannelPlusIE(NiconicoChannelPlusBaseIE):
raise ExtractorError(f'Unknown type: {video_type}', video_id=content_code, expected=False)
# help us to analyze when error occurs
self.to_screen(f'{content_code}: video_type={video_type}, live_status={live_status}')
self.write_debug(f'{content_code}: video_type={video_type}, live_status={live_status}')
session_id = self._call_api(
f'video_pages/{content_code}/session_ids', item_id=f'{content_code}/session',