From c70d630c3a69502ce8e123455ba3f223adf6958e Mon Sep 17 00:00:00 2001 From: alberto-de-swerto Date: Sun, 20 Jul 2025 20:08:18 +0300 Subject: [PATCH 1/2] added markdown, fixed genius --- api/genius.py | 3 ++- docs/architecture/reports/transition-report.md | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 docs/architecture/reports/transition-report.md diff --git a/api/genius.py b/api/genius.py index f18d445..4705366 100644 --- a/api/genius.py +++ b/api/genius.py @@ -20,9 +20,10 @@ def get_genius_text(artist_name, song_title): try: song = genius.search_song(title=song_title, artist=artist_name) lyrics = song.lyrics + if "Lyrics" in lyrics: + lyrics = lyrics.split("Lyrics")[1].strip() if "Read More" in lyrics: lyrics = lyrics.split("Read More")[1].strip() - lyrics = '\n'.join(lyrics.split('\n')[1:]) return lyrics except Timeout: sleep(5) diff --git a/docs/architecture/reports/transition-report.md b/docs/architecture/reports/transition-report.md new file mode 100644 index 0000000..99651eb --- /dev/null +++ b/docs/architecture/reports/transition-report.md @@ -0,0 +1,4 @@ +# Transition report +## Questions and Answers +### 1. Is the product complete? Which parts are done and which aren’t done? +#### Customer is satisfied with the product. \ No newline at end of file From 0acb00fdb1c816758b28cd72eb854928003604b1 Mon Sep 17 00:00:00 2001 From: alberto-de-swerto Date: Sun, 20 Jul 2025 20:10:10 +0300 Subject: [PATCH 2/2] fix api --- api/fast_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/fast_api.py b/api/fast_api.py index bce6d88..da6f200 100644 --- a/api/fast_api.py +++ b/api/fast_api.py @@ -32,7 +32,7 @@ correct_rows = [] -@app.get("/") +@app.get("/api") def root(): return {"message": "FastAPI is working!"}