Changing random.dog to a different API
This commit is contained in:
parent
3eaf676ed9
commit
45794dc7c2
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user