Giter Club home page Giter Club logo

spotisampled's Introduction

spotisampled

a program that creates a new playlist of samples used by tracks/other tracks sampling tracks in a given spotify playlist using data from a beautifulsoup-facilitated web scrape from whosampled.

prior requirements

this program requires the requests, spotipy and beautifulsoup libraries.

download the requests library using the command line:

python -m pip install requests

download the spotipy library using the command line:

pip install spotipy --upgrade

and download the beautifulsoup library using the command line:

pip install beautifulsoup4

setup & usage

download this repository using the command line:

git pull https://github.com/josephquismorio/spotisampled.git

setting up the secrets file

the file secrets.py contains slots for your application client ID, client secret, and your personal spotify username. fill those slots out accordingly. you can create an application at the spotify developer dashboard here.

upon logging in, you are greeted with a... dashboard. click "create an app" and you should see a little menu asking for a name and description for your app - you can name this app whatever you want.

next, find the section labeled "client ID". you should see a link just below it reading "show client secret" - click on it, and the client secret should show. copy both the client ID and client secret and paste it into the secrets.py file.

finally, fill in the username slot with your username, and you should be good as far as the secrets go!

running whosampled

run the spotisampled.py file using:

python3 spotisampled.py

or

python spotisampled.py

upon running the file, you will be prompted to input a playlist URL (make sure this is in the format "https://open.spotify.com/playlist/playlist-name"):

Please enter playlist URL: https://open.spotify.com/playlist/playlist-name

after this is completed, you should see a bunch of command lines that lay out all the tracks in your given playlist:

Playlist given: 

Dynamite! by The Roots
No More Parties In LA by Kanye West
Crime Pays by Freddie Gibbs
...

wait a little bit, and...

Screen Shot 2021-11-18 at 1 58 18 AM

boom! you should have a new playlist containing all the whosampled-ripped samples that could be found on spotify. there also should be a closing message that gives a list of the songs that were unable to be found by the program:

New playlist created! Unable to find:
Indiana by Zoot Sims and Bucky Pizzarelli feat. Buddy Rich
Give Me My Love by Johnny Guitar Watson
Free Spirit by Walt Barr
...

spotisampled's People

Contributors

josephquismorio avatar

Stargazers

 avatar  avatar

Watchers

 avatar

spotisampled's Issues

issues with some songs

tried to export a playlist with "don't cry" by j dilla in it - didn't end up working.

    114         sampledOut = [i.split('\n') for i in list(filter(None, listed[0].split('\t')))][:-1]
    115     for i in sampledOut:
--> 116         samples.append({'query':t, 'type':i[-7], 'genre':i[-6], 'title':i[-3], 'artist':i[-2].replace('by ', '').split(' (')[0], 'year': i[-2].replace('by ', '').split(' (')[1].replace(')', '')})
    117     return samples, sampledBy
    118 

IndexError: list index out of range

apparently, something about its metadata shoots it out of range of the content parser. i'm looking into it.

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.