yes.
This commit is contained in:
parent
846673157b
commit
42b6f185ae
1 changed files with 2 additions and 0 deletions
2
main.py
2
main.py
|
@ -49,7 +49,9 @@ def get_track():
|
|||
opener.addheaders=[('User-Agent','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1941.0 Safari/537.36')]
|
||||
urllib.request.install_opener(opener)
|
||||
filename = "thumbnail.jpg"
|
||||
print('downloading image')
|
||||
urllib.request.urlretrieve(image_url, filename)
|
||||
print('opening image')
|
||||
image = Image.open('thumbnail.jpg')
|
||||
print('resizing image')
|
||||
image = image.resize((32,32))
|
||||
|
|
Loading…
Reference in a new issue