Skip to content

bmensah/genius_lookups

Repository files navigation

Genius Lookups

A program that scrapes browser history, finds lyrics lookups on Genius.com, and puts the songs into a Spotify playlist.

Inspired by TheComeUpCode - SpotifyGeneratePlaylist. Many Thanks!

Table of Contents

  • Set Up
  • Modules and APIs Used
  • Issues/ToDo

Set Up

Finding your spotify user ID:

Your user ID is a 10 digit number that can be found easily via the Spotify Mobile app. Click on Settings -> Account and your user ID is listed right there next to "Username."

Your user ID can also be found via the Spotify Desktop app. Go to the Spotify app on your Desktop. Click on your name on the upper right hand corner. This will bring you to your User page. Find the three-dot menu button under where your username is written in big letters. Click on this, then click on Share -> Copy Spotify URI. Paste the URI into the secrets.py file and remove the "spotify:user:" tags. Leave only the number.

Getting a Token:

Click here to get an authentication token to create and add songs to a playlist. You will need to input your user ID, then press "Get Token". The only scopes you need for this project are 'playlist-modify-public' or 'playlist-modify-private.'

Note: The token expires in about 30 minutes or so. If you are having trouble creating the playlist, try generating a new token.

Running the Project:

Once you download the files and add your Spotify user ID and an OAuth tag to the 'secrets.py' file, simply run the 'add_songs' program.

Modules and APIs Used

  • Spotify API
  • requests Library
  • browserhistory
  • BeautifulSoup
  • unicodedata
  • json
  • unidecode

Issues/ToDo

  • Program currently only works with Chrome broswer on a Mac, but I am working on updating the code to work on all systems and browsers.

Please contact me if in using this module you run into any other issues.

About

A program that scrapes browser history, finds lyrics lookups on Genius.com, and puts the songs into a Spotify playlist.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages