class documentation
class RedditDocument(Document): (source)
Constructor: RedditDocument(title, date, author, url, ...)
Class representing a Reddit document.
Class Method | from |
Convert a PRAW document object to a custom Document object. |
Method | __init__ |
Initialize a RedditDocument object. |
Method | __str__ |
Return a string representation of the RedditDocument object. |
Instance Variable | num |
Undocumented |
Inherited from Document
:
Method | __repr__ |
Return a string representation of the Document object. |
Instance Variable | author |
Undocumented |
Instance Variable | date |
Undocumented |
Instance Variable | source |
Undocumented |
Instance Variable | text |
Undocumented |
Instance Variable | title |
Undocumented |
Instance Variable | url |
Undocumented |
Convert a PRAW document object to a custom Document object. Args: praw_document (praw.models.Submission): The PRAW document object to convert. Returns: Document: The converted Document object.
def __init__(self, title:
str
, date: str
, author: str
, url: str
, text: str
, source: str
, num_comments: int
):
(source)
¶
overrides
modules.document.Document.__init__
Initialize a RedditDocument object.
Args:
title (str): The title of the document. date (str): The date of the document. author (str): The author of the document. url (str): The URL of the document. text (str): The text of the document. num_comments (int): The number of comments on the document.
overrides
modules.document.Document.__str__
Return a string representation of the RedditDocument object.