py_niconico_comment package

Submodules

py_niconico_comment.niconico module

class py_niconico_comment.niconico.NiconicoComments(username, password, loglevel=50)[source]

Bases: object

get_comments(url, user_id=None, language='en')[source]

Get all comment from the giving URL.

Parameters:
Returns:

List of comment.

Return type:

[list]

get_list_user(url, language='en')[source]

Get all user who commented on the giving URL.

Parameters:
Returns:

e.g. ‘{ “rbVzlqGMytJmCIimR1dPWvGRE7w”: [ “wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww” ], “1oYUfTHMjDooDge1QKRpu3QeAmk”: [ “wow”, “wwwwwwwwwwww” ] }’

Return type:

[dict]

is_login = False
to_srt(list_comments=[], shift_time=0.0)[source]

Convert the list of comment to .SRT file content.

Parameters:
  • list_comments (list, optional) – List of comment. Defaults to [].
  • shift_time (float, optional) – +/- time. Defaults to 0.0.
Returns:

SRT file content.

Return type:

[str]

py_niconico_comment.skeleton module

py_niconico_comment.skeleton.main(args)[source]

Main entry point allowing external calls

Parameters:args ([str]) – command line parameter list
py_niconico_comment.skeleton.parse_args(args)[source]

Parse command line parameters

Parameters:args ([str]) – command line parameters as list of strings
Returns:command line parameters namespace
Return type:argparse.Namespace
py_niconico_comment.skeleton.run()[source]

Entry point for console_scripts

py_niconico_comment.skeleton.setup_logging(loglevel)[source]

Setup basic logging

Parameters:loglevel (int) – minimum loglevel for emitting messages

py_niconico_comment.utils module

py_niconico_comment.utils.parse_api_data(api_data, language='en')[source]
py_niconico_comment.utils.seconds_to_string(seconds)[source]
py_niconico_comment.utils.write_file(path, context)[source]

Module contents