Update get_cat_and_post.py

This commit is contained in:
5vl 2023-04-11 11:22:13 +02:00 committed by GitHub
parent 48c5978581
commit d53d86e820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ def upload_media():
)
tweepy_api = tweepy.API(tweepy_auth)
url = "https://api.thecatapi.com/v1/images/search?mime_types=jpg,png&api_key=API_KEY"
url = "https://api.thecatapi.com/v1/images/search?mime_types=jpg&api_key=API_KEY"
cats = requests.request("GET", url).json()
cat_pic = cats[0]["url"]
img_data = requests.get(cat_pic).content