'$CONSOLE:ONLY
'_DEST _CONSOLE
start:
INPUT "Band name:", band$
filename$ = nm$ + " by " + band$ + ".txt"
PRINT GetLyrics
(band$
, nm$
) PRINT #1, GetLyrics
(band$
, nm$
)
INPUT "Another one (Y/N)"; yn$
URLFile = "lyricsapirequest"
URL = "https://api.lyrics.ovh/v1/" + FormatAsHTTP(artist) + "/" + FormatAsHTTP(title)
a% = API_Request(URL, URLFile)
GetLyrics = ""
GetLyrics
= MID$(Request
, 1, LEN(Request
) - 2)
start% = 1
position%
= INSTR(start%
, Request
, " ") MID$(Request
, position%
, 1) = "+" start% = position% + 1
FormatAsHTTP = Request
r$ = a
API_Request
= URLDownloadToFileA
(0, URL
+ CHR$(0), File
+ CHR$(0), 0, 0)