Skip to content

Instantly share code, notes, and snippets.

@jakub-swierk
jakub-swierk / export.js
Last active February 16, 2021 15:37
Export your youtube subscriptions to OPML file.
(function() {
/*
USAGE: Run this function in your devtools while you are on https://www.youtube.com/feed/channels page. Browser will probably ask you to accept file download.
INFO: This file can mess with your news reader! It's because this script does not perfectly duplicate original functionality.
*/
if(document.location.hostname != "www.youtube.com" || document.location.pathname != "/feed/channels") {
console.error("You need to run this page on https://www.youtube.com/feed/channels page.");
return;
}
const opml = document.implementation.createDocument("", "", null);