Skip to content

Instantly share code, notes, and snippets.

@vlad-ds
Last active February 1, 2020 17:53
Show Gist options
  • Select an option

  • Save vlad-ds/224610d789b14b8902215e4623b52135 to your computer and use it in GitHub Desktop.

Select an option

Save vlad-ds/224610d789b14b8902215e4623b52135 to your computer and use it in GitHub Desktop.
streamings = get_streamings()
unique_tracks = list(set([streaming['trackName']
for streaming in streamings]))
all_features = {}
for track in unique_tracks:
track_id = get_id(track, token)
features = get_features(track_id, token)
if features:
all_features[track] = features
with_features = []
for track_name, features in all_features.items():
with_features.append({'name': track_name, **features})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment