![]() The official asynchronous version of PRAW and its usage is similar and has the sameįeatures as PRAW. Is strongly recommended to use Async PRAW. If you plan on using PRAW in an asynchronous environment, (e.g., discord.py, asyncio) it Discord Bots and Asynchronous Environments Please see PRAW’s documentation for more examples of score ) # Obtain the moderator listing for r/test for moderator in reddit. reply ( "An automated reply" ) # Output score for the first 256 items on the frontpage for submission in reddit. top ( time_filter = "week" )) submission. reply ( "Super rad!" ) # Reply to the first comment of a weekly top thread of a moderated community submission = next ( reddit. submit ( "Test Submission", url = "" ) # Comment on a known submission submission = reddit. With the reddit instance you can then interact with Reddit: # Create a submission to r/test reddit. Reddit ( client_id = "CLIENT_ID", client_secret = "CLIENT_SECRET", password = "PASSWORD", user_agent = "USERAGENT", username = "USERNAME", ) Instantiate an instance of PRAW like so: import praw reddit = praw. To install the latest development version of PRAW run the following instead: pip install -upgrade įor instructions on installing Python and pip see “The Hitchhiker’s Guide to Python”Īssuming you already have a credentials for a script-type OAuth application you can The recommended way to install PRAW is via pip. Need to introduce sleep calls in your code. PRAW aims to be easy to use and internally follows all of ![]() ![]() PRAW, an acronym for “Python Reddit API Wrapper”, is a Python package that allows for
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |