-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetAudioFeatures.py
More file actions
35 lines (21 loc) · 852 Bytes
/
getAudioFeatures.py
File metadata and controls
35 lines (21 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import argparse
import warnings
from get_audio_features import audio_features_downloader
warnings.filterwarnings('ignore')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-spotify_key',
'-sk',
help='Your spotify api key')
parser.add_argument('-spotify_secret',
'-ss',
help='Your spotify secret')
args = parser.parse_args()
features = audio_features_downloader.AudioFeatures()
if args.spotify_key is not None:
features.spotify_key = args.spotify_key
if args.spotify_secret is not None:
features.spotify_secret = args.spotify_secret
spotify_key = args.spotify_key
spotify_secret = args.spotify_secret
features.save_features(spotify_key, spotify_secret)