Galebickosikasa

Untitled

Aug 16th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. from yandex_music.client import Client
  2. import urllib.request
  3.  
  4. client = Client.from_credentials ('example@yandex.ru', 'password')
  5.  
  6. my_list = client.users_likes_tracks ().tracks
  7.  
  8. for x in my_list:
  9. track = client.tracks (x.id)[0]
  10. title = track.title
  11. name = track.artists[0].name
  12. uri = track.cover_uri
  13. uri = uri[:-2]
  14. uri = 'http://' + uri + '400x400'
  15. urllib.request.urlretrieve (uri, title + '.jpg')
  16. print (title, name, uri)
  17.  
Add Comment
Please, Sign In to add comment