File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -19,22 +19,21 @@ def main():
1919
2020 vkaudio = VkAudio (vk_session )
2121
22- artists = collections .Counter ()
23-
24- for track in vkaudio .get_iter (- 99463083 ):
25- artists [track ['artist' ]] += 1
22+ artists = collections .Counter (
23+ track ['artist' ] for track in vkaudio .get_iter ()
24+ )
2625
2726 # Составляем рейтинг первых 15
28- print ('\n Top 15:' )
27+ print ('Top 15:' )
2928 for artist , tracks in artists .most_common (15 ):
3029 print ('{} - {} tracks' .format (artist , tracks ))
3130
3231 # Ищем треки самого популярного
3332 most_common_artist = artists .most_common (1 )[0 ][0 ]
3433
35- print ('\n Search for' , most_common_artist )
34+ print ('\n Searching for {}:' . format ( most_common_artist ) )
3635
37- tracks = vkaudio .search (q = most_common_artist )[: 10 ]
36+ tracks = vkaudio .search (q = most_common_artist , count = 10 )
3837
3938 for n , track in enumerate (tracks , 1 ):
4039 print ('{}. {} {}' .format (n , track ['title' ], track ['url' ]))
You can’t perform that action at this time.
0 commit comments