summaryrefslogtreecommitdiff
path: root/scrap/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'scrap/api.py')
-rw-r--r--scrap/api.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/scrap/api.py b/scrap/api.py
new file mode 100644
index 0000000..af83bb7
--- /dev/null
+++ b/scrap/api.py
@@ -0,0 +1,15 @@
+import lyricsgenius
+
+
+genius = lyricsgenius.Genius(
+ "0uSA9UFGsiO2WozVmbWPhyhOoVmUNuM3PXRt9rvWhptHBMgSO5CZBxGUMkwet5mv"
+)
+
+
+def download_albums(albums):
+ [get_album_json(artist[0], album) for artist in albums for album in artist[1]]
+
+
+def get_album_json(artist_name, album_name):
+ album = genius.search_album(album_name, artist_name)
+ return album.save_lyrics()