Check it out: Twitter Link
-
Twitter API
-
Tweepy==3.9.0
-
Lyricsgenius==1.8.6
pip install Tweepy pip install lyricsgenius
You will need to create an app account on https://dev.twitter.com/apps and modify the settings permissions to read and write then generate new Oauth Tokens. you'll need to also sign up for a (free) account that authorizes access to the Genius API.
.
LyricalBot/
│
├── src/
│ ├── env_settings.py
│ └── keys.py
│ └── artists.csv
│
├── lyrics.json
├── geniusAPI.py
├── main.py
└── requirements.txt
The Bot uses a list os artist located in the src/artists.csv
file, if you want to add a new artist you can contribute with a pull request 🖖
The main file for the project is main.py and has some function calls to geniusAPI.py for structuring the lyrics format. To change how many songs you want to query for a specific artist, navigate to geniusAPI.py
and change the value max_songs
:
artist = genius.search_artist(artist_str, max_songs=25, sort="title")
Lyrics are song metadata are stored in the lyrics.json
file extracted using the Lyricgenius API.
If you want to change the amount of time it takes to tweet, go to the main file main.py
and change the time in seconds:
time.sleep(900)
You can fork 🍴 this repository on GitHub as long as it links back to this original repository. Have fun! 🤗
If you want to contribute to this project or just want to add your favorite artist hit me up or send a pull request ✅