Skip to content

Twitter Bot that tweets every 15 minutes quotes from lyrics using Twitter and Genius.com API

Notifications You must be signed in to change notification settings

Luismi74/LyricalBot

Repository files navigation

Lyrical-Bot

Twitter Bot that tweets quotes from lyrics

forthebadge forthebadge forthebadge

Check it out: Twitter Link

Dependencies

  • 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.

Usage

. 
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)

License

You can fork 🍴 this repository on GitHub as long as it links back to this original repository. Have fun! 🤗

Contribute

If you want to contribute to this project or just want to add your favorite artist hit me up or send a pull request ✅

About

Twitter Bot that tweets every 15 minutes quotes from lyrics using Twitter and Genius.com API

Topics

Resources

Security policy

Stars

Watchers

Forks

Sponsor this project