These are chat archives for praw-dev/praw
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to reddit's API.
Currently I've got this set in my code
subm = r.subreddit(SUBREDDIT_NAME).submit(title, url=link,resubmit=False)
I would love to get more in depth with the exceptions but I am unable to get exceptions working.
I know that reddit returns some errors like ALREADY_SUB and more can be found here https://github.com/reddit/reddit/blob/master/r2/r2/lib/errors.py.
This is code ive tried.
except praw.exceptions.APIException(ALREADY_SUB,' that link has already been submitted','url'):
print("That link is already submitted")
Have also tried
except praw.exceptions.APIException('ALREADY_SUB',' that link has already been submitted','url'):