Simple python class to handle requesting for gifs from Tenor.
To import the module, simply put:
from TenorGifs.TenorGifs import GifSearch
Then, later on you may utilize:
Gifs = GifSearch()
Gifs.search('hello')
#Searches for a gif and stores the resuls to be retrieved.
Gifs.Gifs
#Stored gifs.
Gifs.gifCount
#Returns the amount of gifs currently stored.
Gifs.firstGif
#Returns the first gif in the list of stored gifs.
Gifs.lastGif
#Returns the last gif in the list of stored gifs.
Gifs.getRandomGif()
#Returns a random gif from the list of stored gifs.
from TenorGifs.TenorGifs import GifSearch
Gifs = GifSearch()
Gifs.search('hello')
print(Gifs.firstGif)
from TenorGifs.TenorGifs import GifSearch
Gifs = GifSearch()
Gifs.search('hello')
print('Successfully found ' + str(Gifs.gifCount) + ' gifs.')
print(Gifs.getRandomGif())
from TenorGifs.TenorGifs import GifSearch
Gifs = GifSearch()
Gifs.search('1')
numberOne = Gifs.firstGif
Gifs.search('2')
numberTwo = Gifs.firstGif
Gifs.search('3')
numberThree = Gifs.firstGif
print(numberOne)
print(numberTwo)
print(numberThree)
git clone https://github.com/IrtsaDevelopment/TenorGifs.git