Skip to content

Instantly share code, notes, and snippets.

View cloewen8's full-sized avatar
🦄

CJ cloewen8

🦄
View GitHub Profile
@cloewen8
cloewen8 / yt-playlist-length.js
Last active January 16, 2022 06:53
An inspector console script that sums the length of each video in a YouTube playlist.
/*
* To use it, run the script in your browser console on a YouTube playlist web page.
* As items are added to the page, it will locate the video length and add it to a
* running total, which is displayed in the output.
* My approach is to let the page load completely, run the script, than scroll to
* the bottom of the page (scroll speed does not matter). This works for the
* current version of Youtube, as of writing.
*
* I was unhappy with the existing "Youtube Playlist Length" applications online
* and in addon stores. So I made my own.
#!/bin/bash
set -eux
sudo apt-get update
packages="postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-common"
# bug: http://www.postgresql.org/message-id/20130508192711.GA9243@msgid.df7cb.de
sudo update-alternatives --remove-all postmaster.1.gz