Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_id(year):
- search_query = "{0} {1}".format(random.choice(
- 'abcdefghijklmnopqrstuvwxyz'),
- year
- )
- results = sp.search(search_query, type='track', limit=1, offset=random.randint(1, 100)
- )
- ids = [i['id'] for i in results['tracks']['items']]
- return ids
Add Comment
Please, Sign In to add comment