Reference¶
vidgen.console¶
Command line interface.
vidgen.reddit¶
Reddit downloader client.
-
vidgen.reddit.post_to_dict(post, include_children=False, limit=None)¶ Processes the top level comments of a reddit post into a json object.
Gets all of the comments of the post,
- Parameters
post (
Submission) – The reddit post to get comments frominclude_children (
bool) – Whether to include non top-level commentslimit (
Optional[int]) – The maximum amount of comments to return
- Return type
dict- Returns
A dictionary with the post id, title, and a list of processed comment dictionaries with author, votes, ts, and body fields.
-
vidgen.reddit.process_text(text)¶ Processes text into human readable format.
Escapes all html entities and strips zero-width spaces.
- Parameters
text (
str) – The text to be processed- Return type
str- Returns
The processed text.