File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 2222except :
2323 pass
2424
25- user = freesound_client .get_user ("frederic.font " )
25+ user = freesound_client .get_user ("apitest " )
2626print "Username:" , user .username
2727
2828bookmarks_results_pager = user .get_bookmark_categories (page_size = 100 )
2929print "Num categories:" , bookmarks_results_pager .count
3030
3131for bookmark in bookmarks_results_pager :
32- # we have to parse the bokmark category from the sound URL
33- bookmark_category = bookmark .sounds .split ('/' )[7 ]
34-
3532 print "\t Category:" , bookmark .name
3633 print "\t Num sounds:" , bookmark .num_sounds
3734
3835 sounds_results_pager = user .get_bookmark_category_sounds (
39- bookmark_category ,
36+ bookmark . id ,
4037 fields = "id,name,type" ,
4138 page_size = 1
4239 )
4340
44- while sounds_results_pager . results :
41+ while True :
4542 for sound in sounds_results_pager :
4643 print "\t \t Downloading:" , sound .name
4744
5350
5451 sound .retrieve (path_name , name = filename )
5552
53+ if not sounds_results_pager .next :
54+ break
55+
5656 sounds_results_pager = sounds_results_pager .next_page ()
You can’t perform that action at this time.
0 commit comments