This Python script uses the Spotify Web API to fetch the top 10 songs from Spotify's "Top 50 Global" playlist, and displays them in a nice, formatted table.
To use this script, you will first need to obtain your own Spotify API credentials by creating a developer account on the Spotify for Developers website. Once you have your credentials, replace the YOUR_CLIENT_ID
and YOUR_CLIENT_SECRET
placeholders in the code with your actual client ID and client secret, respectively.
You will also need to have Python 3 installed on your computer, as well as the requests library (which you can install via pip).
To run the script, simply open a terminal or command prompt window, navigate to the directory where the script is located, and type the following command:
python top10.py
Rank | Track Name | Artist(s) |
---|---|---|
1. | Montero (Call Me By Your Name) | Lil Nas X |
2. | Kiss Me More (feat. SZA) | Doja Cat, SZA |
3. | Levitating (feat. DaBaby) | Dua Lipa, DaBaby |
4. | Save Your Tears (with Ariana Grande) | The Weeknd, Ariana Grande |
5. | Astronaut In The Ocean | Masked Wolf |
6. | Peaches (feat. Daniel Caesar & Giveon) | Justin Bieber, Daniel Caesar, Giveon |
7. | Your Love (9PM) | ATB, Topic, A7S |
8. | Leave The Door Open | Silk Sonic, Bruno Mars, Anderson .Paak |
9. | Beautiful Mistakes (feat. Megan Thee Stallion) | Maroon 5, Megan Thee Stallion |
10. | Fiel | Los Legendarios, Wisin, Jhay Cortez |
If you would like to contribute to this project, feel free to open a pull request or issue on GitHub.
This code was written by ALIILAPRO.
This project is licensed under the GNU General Public License v3.0 License - see the LICENSE file for details.