dragon-bot/app/doggos.py
2017-10-02 17:49:14 +00:00

19 lines
353 B
Python

import random
import requests
def get_dog():
return random.choice([random_sheeb, random_dog])()
def random_sheeb():
return requests.get(
'http://shibe.online/api/shibes?count=1&urls=true'
).text.split('"')[1]
def random_dog():
return "https://random.dog/{}".format(
requests.get('https://random.dog/woof').text
)