forked from s434650/CatOrNot
11 lines
207 B
Python
11 lines
207 B
Python
|
import requests
|
||
|
|
||
|
def get_image_from_url(url):
|
||
|
f = open('pic.jpg','wb')
|
||
|
f.write(requests.get(url).content)
|
||
|
f.close()
|
||
|
f = open('pic.jpg','rb')
|
||
|
file = f.read()
|
||
|
f.close()
|
||
|
return file
|