/alien

Unofficial Python client for Reddit

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Ernie Logo

Downloads PyPi License

Unofficial Python client for Reddit

Buy Me A Coffee

Installation

pip install alien

The functionality of this library is limited on purpose so it respects the reddit.com/robots.txt rules.

Instantiation

from alien import Alien

alien = Alien()

All posts

Get new posts

for post in alien.get_posts():
    print(post)

Get subreddit's new posts

for post in alien.get_subreddit_posts(subreddit):
    print(post)

Get user's new posts

for post in alien.get_user_posts(username):
    print(post)

Submissions

Get new submissions

for post in alien.get_submissions():
    print(post)

Get subreddit's new submissions

for post in alien.get_subreddit_submissions(subreddit):
    print(post)

Get user's new submissions

for post in alien.get_user_submissions(username):
    print(post)

Comments

Get new comments

for post in alien.get_comments():
    print(post)

Get subreddit's new comments

for post in alien.get_subreddit_comments(subreddit):
    print(post)

Get submission's comments

for post in alien.get_submission_comments(submission):
    print(post)

Get user's new comments

for post in alien.get_user_comments(username):
    print(post)