summaryrefslogtreecommitdiff
path: root/scrap/api.py
blob: af83bb7d37d37f9aa6688b88e1def44dad47a975 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()