mirror of
https://github.com/5vl/AutomatedCats.git
synced 2025-05-24 06:17:01 +00:00
Update get_cat_and_post.py
This commit is contained in:
parent
48c5978581
commit
d53d86e820
@ -14,7 +14,7 @@ def upload_media():
|
|||||||
)
|
)
|
||||||
|
|
||||||
tweepy_api = tweepy.API(tweepy_auth)
|
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()
|
cats = requests.request("GET", url).json()
|
||||||
cat_pic = cats[0]["url"]
|
cat_pic = cats[0]["url"]
|
||||||
img_data = requests.get(cat_pic).content
|
img_data = requests.get(cat_pic).content
|
||||||
|
Loading…
x
Reference in New Issue
Block a user