aag / billboard_yt_playlist_creator Goto Github PK
View Code? Open in Web Editor NEWA Python script to create YouTube playlists of the current Billboard charts.
License: GNU Lesser General Public License v3.0
A Python script to create YouTube playlists of the current Billboard charts.
License: GNU Lesser General Public License v3.0
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.
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.
There are currently very minimal tests in createbillboardplaylist_test.py
. We should improve this significantly.
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.
Any chance you have a version of it in Python 3?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.