Changing random.dog to a different API

This commit is contained in:
Luke Robles 2021-01-28 10:20:52 -08:00
parent 3eaf676ed9
commit 45794dc7c2

View File

@ -28,10 +28,8 @@ def random_sheeb():
def random_dog():
dog_url = None
while not dog_url:
dog_url = requests.get('https://random.dog/woof').text
if 'mp4' in dog_url[-3:]:
dog_url = None
return "https://random.dog/{}".format(dog_url)
dog_url = requests.get('https://dog.ceo/api/breeds/image/random').json()['message']
return dog_url
def random_bird():
bird = None