GithubHelp home page GithubHelp logo

aag / billboard_yt_playlist_creator Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 8.0 112 KB

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

License: GNU Lesser General Public License v3.0

Python 100.00%

billboard_yt_playlist_creator's People

Contributors

aag avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

billboard_yt_playlist_creator's Issues

Add Search Caching

The current code does a YouTube search for every song in every playlist. This is a problem because the current Google API credits system ranks searches as very expensive, so a normal account doesn't have enough credits to search for all the songs in every playlist in a single day.

Since the songs in the charts don't change that quickly, and some songs are in multiple playlists, we can do better by caching the search results. We should write the video ID and creation date to a file (perhaps a Shelve or an SQLite file) each time we do a search, and always look for an entry in the cache before doing a search. We could also clean up old entries after a certain amount of time, maybe a year.

Move charts to config file

Instead of hardcoding the list of charts in the create_all() function, it would be better to allow each user to configure the charts in the settings.cfg file.

We'll need the ability to define an arbitrary-length list of charts, which might not be easy to do with the INI file format understood by SafeConfigParser. If not, we could potentially change to TOML.

Improve Testing

There are currently very minimal tests in createbillboardplaylist_test.py. We should improve this significantly.

Resume creation of partial playlists

Currently, if the script detects that a playlist already exists, it assumes the playlist is complete and skips it. Instead, we should verify that the playlist has the full number of songs expected for that chart and if not, pick up where the last run left off.

This will probably require changing the create_playlist_from_chart() function to accept a number of songs, so we know how many to expect.

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.