feat(lyrics): Fetch from genius

parent 14c73a05
This source diff could not be displayed because it is too large. You can view the blob instead.
import lyricsgenius
def fetch():
genius = lyricsgenius.Genius("zUSpjfQ9ELXDqOjx9hGfAlJGYQFrNvHh3rlDV298_QSr5ScKf3qlHZtOO2KsXspQ")
response = genius.search_artist("Dooz-kawa")
print(response)
for hit in response["hits"]:
print(hit)
def main():
fetch()
if __name__ == '__main__':
main()
import os
import pickle
import lyricsgenius
from lyricsgenius.artist import Artist
def fetch():
genius = lyricsgenius.Genius("zUSpjfQ9ELXDqOjx9hGfAlJGYQFrNvHh3rlDV298_QSr5ScKf3qlHZtOO2KsXspQ")
dooz: Artist = genius.search_artist("Dooz-kawa")
dooz.save_lyrics(overwrite=True)
print(dooz)
# with open("./dooz.dat", "a+") as f:
# pickle.dump(dooz, f)
def load() -> Artist:
with open("./dooz.dat", "r") as f:
return pickle.load(f)
def main():
fetch()
# dooz = load()
# print(dooz)
if __name__ == '__main__':
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment