genius_trending.py is a Python API for downloading the top 10 trending songs from Genius.com.
You can install genius_trending.py with pip by executing the following (it's a -
not a _
when installing):
pip install genius-trending.py
To download the trending songs on Genius, we need to construct a GeniusData
object.
>>> import genius_trending as genius
>>> trending = genius.GeniusData()
Now, let's take a look at what information is available in each SongEntry
!
>>> song = trending[0]
>>> print(song.title)
This is America
>>> print(song.artist)
Childish Gambino
>>> print(song.rank)
1
We even have the option of printing the entire trending songs chart!
>>> print(trending)
Top 10 songs on Genius as of 10:00PM on May 20, 2018
----------------------------------------------------
1. This is America by Childish Gambino
2. Fake Love by BTS
3. Yes Indeed by Lil Baby & Drake
#...
Feel free to submit a pull requests! If you found a bug or would like to request something else, create an issue here.
- This project is licensed under the MIT License.
- The Genius trending information is owned by Genius Media Group Inc. See Genius.com's Terms of Use for more information.