2016-10-19 14:04:20 +03:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2016-10-22 13:43:33 +03:00
|
|
|
import lastfm_backup as lfm
|
2016-10-19 14:04:20 +03:00
|
|
|
|
2019-08-30 00:29:25 +03:00
|
|
|
API_KEY = '0'
|
|
|
|
USERNAME = 'admin'
|
2016-10-19 14:04:20 +03:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
pages = lfm.get_pages(USERNAME, API_KEY)
|
2019-08-30 00:29:25 +03:00
|
|
|
count = 0
|
2016-10-19 14:04:20 +03:00
|
|
|
|
|
|
|
for page in range(1, pages + 1):
|
|
|
|
tracks = lfm.get_scrobbles(USERNAME, API_KEY, page)
|
|
|
|
|
|
|
|
for track in tracks:
|
|
|
|
print('%s - %s' % (track['artist']['#text'], track['name'],))
|
2019-08-30 00:29:25 +03:00
|
|
|
count = count + 1
|
|
|
|
|
|
|
|
print('\nTotal scrobbling tracks: %d' % count)
|