How to confirm success of subreddit.submit function?
See original GitHub issuesubreddit.submit()
returns a Submisison object. How can I check whether the submission was successful or not? None of the fields in a submission indicate this information. thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Subreddit Analytics: The Top Six Tools - Brandwatch
Want to track and analyze Reddit and its subreddits? We go through the best tools around so you can use subreddit analytics in...
Read more >reddit.com: api documentation
Modhashes can be obtained via the /api/me.json call or in response data of listing endpoints. The preferred way to send a modhash is...
Read more >Fail to call reddit's /api/submit - node.js - Stack Overflow
I'm trying to call /api/submit. var options = { url: 'https://oauth.reddit.com/api/submit', method: 'POST', headers: { 'Authorization': 'bearer '+usertoken , ' ...
Read more >A Beginner's Guide to Reddit: How to Get Started & Be ...
This guide will help you learn more about what Reddit is, who uses it, what makes it different, and how to successfully get...
Read more >Post on Reddit API With Python (PRAW) - JC Chouinard
In this post, we will see how to post to a subreddit using the PRAW ... If you know nothing about Python, make...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We can’t accurately document Reddit’s exceptions since Reddit has gone closed-source. All of those end up as
APIException
, which we have documentation for.@RylanSchaeffer Thank you for expressing your concerns.
In my experience, PRAW’s handling of this is in line with most other Python libraries. That is, for most other libraries, if a function returns without raising an exception, then it has succeeded. This is also true of the Python standard library; for instance, Python’s file handling will throw an exception such as
FileNotFoundError
under certain conditions, but lack of exceptions indicates success.In what ways can we make this clearer? I want new users of PRAW to be as comfortable as possible. One option might be to write another tutorial like this one and the other two that we already have. The new tutorial could focus on a few tasks which might fail and how to handle failure. Do you have another suggestion?
Thanks for your input!