Exceptions - Quantum-Codes/ScraGet GitHub Wiki
You can find the full list of exceptions here.
To catch an exception:
from ScraGet import ScraGet, Exceptions #Importing the exceptions
user = ScraGet.get_user()
try: #to handle error
user.updateScratch("Hello world! Hello? Hi.... anyone?") #this user doesn't exist. So this should throw an error
except Exceptions.UserNotFound:
print("OH.. this user doesn't exist!!")
You can do the same with other exceptions. Just replace the <the exception>
in Exceptions.<the exception>
to catch a different error.
Did you get an error caused internally by ScraGet but didn't get an error from exceptions list? Make an issue!