Coder Social home page Coder Social logo

musical-time-machine's Introduction

Musical Time Machine

This Python program creates a Spotify playlist of the Billboard Hot 100 songs for a specific date.

Setup

  1. Clone the repository or download the Python file.
  2. Install the required libraries using pip.
  3. Obtain the necessary credentials:
  • Spotify: Create a Spotify developer account and create an application to obtain the CLIENT_ID, CLIENT_SECRET, and REDIRECT_URI. Set the REDIRECT_URI as a valid redirect URI for your Spotify application.
  1. Set the environment variables:
  • CLIENT_ID: Your Spotify application's client ID.
  • CLIENT_SECRET: Your Spotify application's client secret.
  • REDIRECT_URI: Your Spotify application's redirect URI.

Usage

  1. Run the Python script in your terminal or IDE.
  2. Enter the date you want to travel to in the format YYYY-MM-DD when prompted.
  3. The program will scrape the Billboard Hot 100 songs for the specified date from billboard.com.
  4. It will authenticate with Spotify using your provided credentials.
  5. The program will search for each song on Spotify and retrieve the track URI.
  6. It will create a new private Spotify playlist with the name [travel_date] Billboard 100 (e.g., 2023-06-06 Billboard 100) if it doesn't already exist.
  7. Finally, the program will add the retrieved song URIs to the playlist.

Note

Ensure that your Spotify account has the necessary permissions to create private playlists and modify your playlists.

Tech Stack

Language: Python
Libraries: spotipy, BeautifulSoup, requests, datetime, and os

API's

Spotify Web API - spotipy uses Spotify Web API behind the scenes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.