junio 18, 2024

Youtube Suscriptions RSS link

 Algo que no sé por qué no exizte facil y siempre hay que buscarle la vuelta. Y encima cada tantos años cambia y no se actualiza.

Esta es la version 2024


Instructions

  1. Navigate to https://www.youtube.com/feed/channels
  2. Open your browser's dev tools to the "Sources" page.
  3. You should see 'channels (www.youtube.com)' or something similar, click that and you should see the DOM. It should start with '<!DOCTYPE html>'.
  4. Scroll to the bottom. Keep scrolling until it has loaded all of your subscriptions.
  5. Open the console in the dev tools (if it's not already) and paste this script in and press return on your keyboard.
var opmlData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<opml version=\"1.0\">\n<body>\n<outline text=\"YouTube Subscriptions\" title=\"YouTube Subscriptions\">\n" + JSON.stringify(ytInitialData.contents).match(/"channelId":\s*"([^"]+)",\s*"title":\s*{\s*"simpleText":\s*"([^"]+)"\s*}/g).map(match => /"channelId":\s*"([^"]+)"/.exec(match)[1]).map(cid => `<outline type="rss" xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=${cid}" />`).join('\n') + "\n</outline>\n</body>\n</opml>";
var blob = new Blob([opmlData], { type: 'text/xml' });
var a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = 'subscriptions.opml';
a.click();

Tested in Safari and Chrome on MacOS

  1. You should get a prompt to allow downloads on the page. Accept it and you should have the .opml file you need for your RSS reader.