Skip to content

Instantly share code, notes, and snippets.

View hazycora's full-sized avatar
💜
h

hazel cora hazycora

💜
h
View GitHub Profile
@hazycora
hazycora / youtube-playlist-duration.js
Created November 2, 2022 20:06
get the duration of a youtube playlist
// scroll down so the entire playlists videos have been fetched, and run this
(() => {
const sumArray = (arr) => {
let sum = 0
for (let seconds of arr) {
sum+=seconds
}
return sum
}
const timestampElems = [...document.querySelectorAll('ytd-playlist-video-list-renderer ytd-thumbnail-overlay-time-status-renderer span.style-scope.ytd-thumbnail-overlay-time-status-renderer')]
@hazycora
hazycora / youtube-subscription-csv-export.md
Last active October 12, 2025 18:35
Export YouTube subscriptions in CSV Google Takeout format.

Go to youtube.com/feed/channels

The page should display a list of your YouTube subscriptions. Run the following JavaScript in the console. Your YouTube subscriptions will be displayed on screen for you to copy-paste.

This CSV response can be saved and imported into other apps which can load Google Takeout subscription files, such as NewPipe.