snapchat api in python 1

snapchat api in python

>>> from snapchat import *
>>> me = SnapChat("sdushantha")
>>> me.check_username()
'sdushantha is already taken!'
>>> # Since the usename is taken, that means it is a valid username
>>> me.get_snapcode(bitmoji=False, size=500)
(..., 'PNG', '500x500')
>>> # The dotted part (...) is the raw data of the image
>>> # You use this data to write it into a file or do whatever you like

Here is what the above code is Doing:
1. Importing the SnapChat class from the snapchat module
2. Creating an instance of the SnapChat class with the username as the argument
3. Checking if the username is valid
4. Getting the snapcode of the user

Similar Posts