https://github.com/antoncoding/spotify_lyric
An command line tool to show lyric of current playing song on Spotify (especially for CN)
https://github.com/antoncoding/spotify_lyric
lyrics lyrics-fetcher python spotify spotify-api
Last synced: 11 months ago
JSON representation
An command line tool to show lyric of current playing song on Spotify (especially for CN)
- Host: GitHub
- URL: https://github.com/antoncoding/spotify_lyric
- Owner: antoncoding
- Created: 2019-04-13T13:51:37.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T22:21:42.000Z (about 3 years ago)
- Last Synced: 2025-02-28T23:52:36.215Z (12 months ago)
- Topics: lyrics, lyrics-fetcher, python, spotify, spotify-api
- Language: Python
- Homepage:
- Size: 66.4 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spotify Lyric
===
> An command line tool to show lyric of current playing song on Spotify.
> Use 千千音樂 Search to optimize Chinese song searching result.

## Usage
### 0. Clone and install packages
```console
git clone https://github.com/antoncoding/spotify_lyric
pip install -r requirements.txt
pip install git+https://github.com/plamere/spotipy.git --upgrade
```
You must use the last command to manually upgrade spotipy.
### 1. Get Spotipy Client Token
* Go to https://developer.spotify.com/dashboard/login, use your Spotify Account to sign in.
* click on **CREATE CLIENT ID**, follow all the instructions to create your application.

* You can find your Client ID on the Dashboard, click **SHOW CLIENT SECRET** to get the secret token.

* Go to **Edit Settings** and add the following uri to **Redirect URIs**: http://localhost:8888/callback/. Make sure you save it.

### 2. Create `const.py`
You can either create a `const.py` file in the root directory **or just rename** `const_example.py` to `const.py`. Paste the **CLIENT_ID** and **CLIENT_SECRET** you got from app dashboard here. (Also make sure the **redirect_uri** match the value you set in the dashboard setting.)
```python
USERNAME = 'Anton'
CLIENT_ID = 'PASTE YOUR CLIENT IT HERE'
CLIENT_SECRET = 'PASTE YOUR CLIENT SECRET HERE'
REDIRECT_URI = 'http://localhost:8888/callback/'
```
### 3. Run it for the first time
Run the following command to start the tool:
```console
python start_live_lyric.py
```
If this is your first time running with the `USERNAME` you set, you will be ask to login to Spotify on your web browser, **copy the whole uri you were redirected to** and paste it to the terminal:
Example URI:
```
http://localhost:8888/callback/?code=AQBIrqzUgg21VHOB8g4u-mzGvKv_IG7d39PirD3iWr5bM6awaeAOrQiweCdOMWOO03EI9hoae51oEuqNVzpJC1xxJXT6LcdI53aGjJTtGRMyRW52bPsXU58gTpn96lzp-mNOpPeDWaJVAKQ53ZNxD3-ebnHAEhlb48il3QlqO5r8bTYdXmlItgyA9wPXTENp8xZoOyepZHWAs6aZRtbmmWVnEiFSTLGwLD7e_QBVr1loGKnr
```

Press `Enter` to start the tool.
