genius-lyrics | Fetch Lyrics from Genius Fastly with no Effort | Animation library
kandi X-RAY | genius-lyrics Summary
kandi X-RAY | genius-lyrics Summary
Fetch Lyrics from Genius Fastly with no Effort!
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of genius-lyrics
genius-lyrics Key Features
genius-lyrics Examples and Code Snippets
Community Discussions
Trending Discussions on genius-lyrics
QUESTION
Program description: I already have a functioning program that runs on console window, but I'd like to present its output on a locally hosted web page. The program consists on getting lyrics for currently playing songs by making requests to Spotify's API. I store the current lyrics in a "lyrics.txt" file.
What I want:
Change the web page from the running lyrics program when it detects the song has changed.
[EDIT:]
Is there a way to make the flask page display a variable, that is updated by a python request.post of the lyrics app to the flask url with the updated variable as the data?
What I have:
I'm using Flask as the framework since its a one local web page.
...ANSWER
Answered 2019-Nov-23 at 14:08You would need JavaScript/AJAX
on page which periodically sends request for new content and Flask should send current content from file.
In this example I use jQuery.get() to send request to server, and setTimeout()
to repeat it periodically.
Flask
sends current time to show different content.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install genius-lyrics
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page