Giter Club home page Giter Club logo

youtube-subscriptions-rss's People

Contributors

jeb5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

youtube-subscriptions-rss's Issues

Thanks!

Just wanted to say thanks for this, saved me writing a whole bunch of stuff on my own to try and get an RSS feed of my sub feed! Still have to deal with those damn Shorts showing up in feeds, but thankfully I can just unfollow that one channel and get their stuff through other means.

Add channel URL

Thank you for creating and sharing this project, it's really helpful!

I'd love it if you could export channel URL in addition to RSS URL.

Here is my patch for it.

@@ -16,13 +16,14 @@
                        label.innerText = `Fetching URLS... (${progress.value}/${progress.max})`;
                        try {
                                const channelName = e.querySelector("yt-formatted-string.ytd-channel-name").innerText;
+                               const channelUrl = e.href;
                                const channelReq = await fetch(e.href);
                                if (!channelReq.ok) { console.error(`Couldn't fetch channel page for ${channelName}`); continue; }
                                const channelPageDoc = new DOMParser().parseFromString(await channelReq.text(), "text/html");
                                const links = channelPageDoc.querySelectorAll("body > link[rel=alternate], body > link[rel=canonical]");
                                const channelIdMatch = [...links].map(e => e.href.match("/channel/([a-zA-Z0-9_\-]+?)$")).find(e => e != null);
                                if (channelIdMatch == null) { console.error(`Couldn't find channel id for ${channelName}`); continue; }
-                               channels.push([`https://www.youtube.com/feeds/videos.xml?channel_id=${channelIdMatch[1]}`, channelName]);
+                               channels.push([`https://www.youtube.com/feeds/videos.xml?channel_id=${channelIdMatch[1]}`, channelName, channelUrl]);
                        } finally {
                                progress.value++;
                                progress.replaceWith(progress);
@@ -35,8 +36,8 @@
                        console.log(channels.map(([feed, _]) => feed).join("\n"));
                        let opmlText = `<opml version="1.0">\n\t<head>\n\t\t<title>YouTube Subscriptions as RSS</title>\n\t</head>\n\t<body>\n\t\t<outline text="YouTube Subscriptions">${channels
         .map(
-          ([feed, channelName]) =>
-            `\n\t\t\t<outline type="rss" text="${channelName}" xmlUrl="${feed}"/>`
+          ([feed, channelName, channelUrl]) =>
+            `\n\t\t\t<outline type="rss" text="${channelName}" xmlUrl="${feed}" htmlUrl="${channelUrl}"/>`
         )
         .join("")}\n\t\t</outline>\n\t</body>\n</opml>`;
                        const url = window.URL.createObjectURL(new Blob([opmlText], { type: "text/plain" }));

OPML files are invalid

Tried importing them in Thunderbird and Akregator and it doesn't work. I think it has something to do with the feed putting everything in a single line. I tried fixing that with a simple beautify method but that didn't fix the issue. I have 1500 subscriptions so maybe that might be why.

Does not load all subscriptions if there are over 100

Great script, thank you!
Just please put a disclaimer or automate scrolling down to the very bottom so all channels are loaded otherwise only first 100 will be saved and the user may not know if they have 102 channels

Parsing error with auto-generated YouTube Music channels

First of all, thank you for the great script! It helped me a lot.

When you follow an artist on YouTube Music who doesn't have his own YouTube channel, YT automatically creates a topic channel for the artist. Here is an example:

https://www.youtube.com/channel/UCZLrcCdfVC6gCQvADhSSWuQ

I've noticed that the script fails with the following error when it encounters one of these channels: TypeError: Cannot read properties of null (reading '1')

I assume that topic channels don't have their own RSS feed. Would it be possible to skip them in the script?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.