master
Lukas Schulz 2020-12-19 23:10:54 +01:00
parent 846673157b
commit 42b6f185ae
1 changed files with 2 additions and 0 deletions

View File

@ -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))