Coder Social home page Coder Social logo

mgrundy / setlist_yt_playlist_creator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aag/billboard_yt_playlist_creator

0.0 2.0 0.0 59 KB

A Python script to create YouTube playlists of the current Billboard charts.

License: GNU Lesser General Public License v3.0

Python 100.00%

setlist_yt_playlist_creator's Introduction

Create YouTube Playlists from Set Lists

License

This is a Python script that will take a text file with your cover tunes set list and create a YouTube playlist containing videos for all the songs in the list. Perfect for the music director of a working cover band to create playlists to break in new tunes or new players.

When run, the script reads in the text file. Since it uses youtube's search function it doesn't need to be a specific format. Each line can be as simple as the song name and the band that does it. If there is a specific version you'd like to include, just put in the title as it shows on youtube (e.g. Long version, or metal version). For each line in the list, it searches YouTube for a video of each song and adds the first result to a playlist with the title you specified.

This program is built from Adam Goforth's Billboard Top N Playlist creator. Finding his work allowed me to get this working within an hour. GPL FTW!

Also note that while this works it is super crufty right now. I'm not sure if the pipenv bits work at all. There is next to zero argument checking. Running it like this works:

python3 createsetplaylist.py -l setlist -t "Test Set Play List"

An example of what the script creates can be seen here:

https://www.youtube.com/playlist?list=PL3YYv-ltyAmMX-H2CwI9h4awPRAauJ2PI

Dependencies

This script depends on Python 3.4 and these Python packages:

Usage

  1. Clone the git repository.

  2. Install the Python dependencies with pipenv. Run this command within the root directory of the repository:

    $ pipenv install
  3. Create a new project in the Google Developer Console by clicking the "Select a project" dropdown in the header and clicking the "Create a project" button. Give the project any name you like. After creating the project, open it if it isn't opened automatically.

  4. Enable the Youtube Data API in the Library tab of your Google Developer Console. Open the "Library" tab, then click the "Youtube Data API" link and click the "Enable" link.

  5. Create an API key. Go to the Credentials tab in the Google Developer Console and click "Create credentials". Select "API key" from the dropdown.

  6. Create a new client ID. Still on the Credentials tab of the Google Developer console, click "Create credentials". Select "OAuth client ID" from the list and select the application type "Other". Click the "Create" button. Click "OK" in the modal dialog that appears. The new client ID should appear on the Credentials page. Click the "Download JSON" button for your new client ID. A download of the JSON key will start in your browser. Save the file with the name client_secrets.json in the root directory of your clone of the git repository.

  7. Copy settings-example.cfg to settings.cfg and fill in the API key you created in step #5. Then run:

    $ pipenv run python createsetplaylist.py --noauth_local_webserver
  8. The first time you run the script, you will have to authenticate the application in a web browser. Open the URL that the script outputs, approve the application for the YouTube Account in which you want to create the playlists, and enter the verification code on the command line. This will create a file, oauth2.json, which must be kept in the root of the git repository as long as you want to upload playlists to this account.

  9. In subsequent runs of the script, you can run it without any command line arguments:

    $ pipenv run python createsetplaylist.py

Troubleshooting

If the script was working, but you start getting HttpError 404 responses with the message "Channel not found.", you may have to re-authorize the application. Do this by deleting the oauth2.json file and running the script with --noauth_local_webserver.

License

This code is free software licensed under the GPL 3. See the LICENSE.md file for details.

setlist_yt_playlist_creator's People

Contributors

aag avatar mgrundy avatar

Watchers

 avatar James Cloos avatar

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.