dragon-bot/app/animals.py
Luke R 2ba286a770
All checks were successful
Build and push / changes (push) Successful in 4s
Build and push / Lint-Python (push) Successful in 34s
Build and push / Build-and-Push-Docker (push) Successful in 1m45s
Build and push / sync-argocd-app (push) Successful in 8s
good enough, fuckin wwith the get_from_reddit stuff mainly for sheebs
2024-10-24 14:19:12 -07:00

64 lines
1.4 KiB
Python
Executable File

import random
import glob
import requests
import get_from_reddit
def get_red_panda():
red_panda = None
while not red_panda:
red_panda = requests.get("https://some-random-api.ml/img/red_panda").json()[
"link"
]
return red_panda
def get_dog():
# return random.choice([random_sheeb, random_dog, random_dog_reddit])()
return random_dog_reddit()
def random_sheeb():
# return requests.get("http://shibe.online/api/shibes?count=1&urls=true").json()[0]
return get_from_reddit.get_image(["shiba", "shibe", "shibainu"])
def random_dog():
dog_url = None
while not dog_url:
dog_url = requests.get("https://dog.ceo/api/breeds/image/random").json()[
"message"
]
return dog_url
def random_dog_reddit():
return get_from_reddit.get_image(
[
"AustralianCattleDog",
"GSP",
"corgi",
"dogpictures",
"rarepuppers",
"tippytaps",
"vizsla",
"zoomies",
"shiba",
"swedishvallhund",
"puppy101",
"lookatmydog",
"jackrussellterrier",
]
)
def dale():
return random.choice(glob.glob("/tmp/dale/*"))
def cowboy():
return random.choice(
["https://i.imgur.com/RAFfsk7.png", "https://i.imgur.com/Ppse2ic.jpg"]
)