comment submodule

This module defines the Comment class which is used to repesent informations about comments.

class abclinuxuapi.comment.Comment

Bases: object

Comment representation.

Note

For registered users, the username property contains real username, which may differ from what you see, but this allows you to identify the user.

This is because registered users can (and do) change their visible usernames anytime they want.

url

str – Absolute URL of the comment.

text

str – Fulltext of the comment.

timestamp

int – Date of the publication as timestamp.

username

str – Username of the poster.

registered

bool – Was the user registered?

censored

bool – Is the comment censored? If so, you will need additional parsing of the comment, which is not yet implemented.

responses

list – List of Comment instances responding to this comment.

response_to

obj – Reference to Comment to which you are responding. None in cases where the object is at the top of the comment tree.

id

Returns – str: Identification of the comment.

static comments_from_html(html)

Parse comments in html, return list of connected Comment instances.

Parameters:html (str) – Webpage for parsing.
Returns:List of Comment instances linked also into trees using response_to and responses properties.
Return type:list