r/Python • u/[deleted] • Aug 28 '20
Beginner Showcase This post has
3829 upvotes,
572 downvotes,
297 comments,
3257 score,
and 3 awards!
Edits: 23526 since Friday, August 28, 2020 at 8:30PM EST.
Credit to u/Krukerfluk and Tom Scott!
Code: https://github.com/CalvinMiller190/reddit-post
This post uses the praw module to get the information about the post, then edits the post every second based on the information that it got!
3.4k
Upvotes
1
u/[deleted] Aug 29 '20
Quick tip, look into using environment variables so that you can have complete code in your GitHub repository. That way instead of your password looking like:
password="*******" (presumably hunter2)
It would read:
password=os.getenv("password")
Now instead of filler code for your PRAW initialization section, you can direct users to create appropriate environment variables for re-use.