From 2e8ddbf422a3a6d75b1e1f73cad089111f801c05 Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Tue, 24 Sep 2024 12:21:40 +0200 Subject: finished web scrapper --- scrap/api.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scrap/api.py (limited to 'scrap/api.py') 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() -- cgit v1.2.3