How to Read Reddit with Python
Outside of Steemit I expect a heck of a lot of you are also members of Reddit.
Keeping up with your favourite subreddit can be tricky - what if the best submissions came to you, rather than you going and looking?
Reddit API Wrapper for Python
Reddit has a decent API, and there is a Python wrapper called PRAW (Python Reddit API Wrapper). PRAW is available via pip
pip install praw
API Keys
To get started all you need to do is go into your account and set up your new app as a script.
You will be given your unique API details, that you can then use to gain read access. If you want more than that you will need oAuth and/or your login.
From there the code is very simple
Code
import praw
reddit = praw.Reddit(client_id='',
client_secret='',
user_agent='')
# get top 20 from 3dprinting
for submission in reddit.subreddit('3dprinting').hot(limit=20):
print(submission.title)
print(submission.url)
print()