Cat now says stuff
This commit is contained in:
1 parent
17ff41b63e
commit
bf04dfb46c
1 file changed
+3
-2
@@ -7,11 +7,12 @@ import urllib.request
|
|||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
def cat(w, h):
|
def cat(w, h):
|
||||||
url = f'https://cataas.com/cat?width={w}&height={h}'
|
url = f'https://cataas.com/cat/says/DOCHKATZE?size=100&width={w}?height={h}?text=cat'
|
||||||
resp = urllib.request.urlopen(url)
|
resp = urllib.request.urlopen(url)
|
||||||
im_data = resp.read()
|
im_data = resp.read()
|
||||||
im = Image.open(BytesIO(im_data))
|
im = Image.open(BytesIO(im_data))
|
||||||
return im
|
return im
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
cat(1920,1080)
|
cat = cat(1920,1080)
|
||||||
|
cat.show()
|
||||||
Reference in new issue
Block a user