yes.
This commit is contained in:
parent
4a755f6661
commit
2943dd114d
1 changed files with 2 additions and 3 deletions
5
main.py
5
main.py
|
@ -41,10 +41,9 @@ def get_track():
|
|||
print(track['is_playing'])
|
||||
print(track['item']['name'] + ' - ' + track['item']['artists'][0]['name'])
|
||||
print('getting image')
|
||||
with urllib.request.urlopen(track['item']['album']['images'][0]['url']) as url:
|
||||
f = BytesIO(url.read())
|
||||
urlretrieve(track['item']['album']['images'][0]['url'], 'thumbnail.jpg')
|
||||
#imageString = requests.get(track['item']['album']['images'][0]['url'])
|
||||
image = Image.open(f)
|
||||
image = Image.open('thumbnail.jpg')
|
||||
print('resizing image')
|
||||
image = image.resize((32,32))
|
||||
#return image
|
||||
|
|
Loading…
Reference in a new issue