updated cache, ready for audio features

This commit is contained in:
aj 2020-01-25 12:47:20 +00:00
parent db436a3488
commit d46f441313
5 changed files with 37 additions and 4 deletions

3
.gitignore vendored
View File

@ -3,4 +3,5 @@ __pycache__
*.csv
.idea
.fm
scratch.py
scratch.py
service.json

19
audio-features-prep.py Normal file
View File

@ -0,0 +1,19 @@
from fmframework.net.network import Network as FmNet
from spotframework.net.network import Network as SpotNet
from spotframework.net.user import NetworkUser
from spotframework.model.uri import Uri
from csv import DictWriter
import os
import datetime
import json
from log import logger
spotnet = SpotNet(NetworkUser(client_id=os.environ['SPOT_CLIENT'],
client_secret=os.environ['SPOT_SECRET'],
refresh_token=os.environ['SPOT_REFRESH']).refresh_access_token())
fmnet = FmNet(username='sarsoo', api_key=os.environ['FM_CLIENT'])

View File

@ -1,9 +1,22 @@
cachetools==4.0.0
certifi==2019.11.28
chardet==3.0.4
Click==7.0
google-api-core==1.16.0
google-auth==1.11.0
google-cloud-bigquery==1.23.1
google-cloud-core==1.2.0
google-resumable-media==0.5.0
googleapis-common-protos==1.51.0
idna==2.8
numpy==1.18.1
opencv-python==4.1.2.30
protobuf==3.11.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
pytz==2019.3
requests==2.22.0
rsa==4.0
six==1.14.0
tabulate==0.8.6
urllib3==1.25.7

View File

@ -25,8 +25,8 @@ else:
uris = []
# scrobble range
from_date = datetime.datetime(year=2017, month=1, day=1)
to_date = datetime.datetime(year=2018, month=1, day=1)
from_date = datetime.datetime(year=2018, month=1, day=1)
to_date = datetime.datetime(year=2019, month=1, day=1)
scrobbles = fmnet.get_recent_tracks(from_time=from_date, to_time=to_date, page_limit=200)

File diff suppressed because one or more lines are too long