Giter Site home page Giter Site logo

m-rei / youtube-opml-exporter-script Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 9 KB

Greasemonkey firefox addon script restoring RSS exporter functionality for youtube, which has been recently removed

JavaScript 100.00%
youtube firefox-addon greasemonkey-userscript javascript

youtube-opml-exporter-script's People

Contributors

avhon avatar m-rei avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

avhon

youtube-opml-exporter-script's Issues

OPML file only has alphabetically-first 100 subscriptions

If the youtube account has more than 100 subscriptions, the channel list page loads with only the first 100 on it, in alphabetical order. When the browser scrolls to the bottom of the list, a POST request is triggered from a continuationItemRenderer, which causes more (the next 100, I think? my account has more than 100 but less than 200 subscriptions) to be loaded onto the page.

Since this script runs shortly after page load time, it can only see the first 100 subscriptions.

The contents of the script do get all subscriptions if you manually scroll to the bottom of the page, allowing the continuations to load all of the subscriptions onto the page, and then manually run it.

I have 2 ideas for changing the script to circumvent this:

  1. When the script loads, check the page to see if there are any continuationItemRenderers, make the POST request that they would make, and wait for the new content to load. Repeat until there are no new continuationItemRenderers, then parse the page for channels.

  2. Make the download be manually triggered, with a button on the page or something. Maybe add some language like "download OPML of subscriptions shown on this page". Alternatively, put the button on the bottom of the page, so the you have to scroll to get to it, and will trigger continuation loads when you do that.

Downloaded file has no newlines or tabs

Even though the href data is nicely formatted with newlines and indentation, all of it is lost when the file is actually downloaded. This makes it difficult to manually read the file.

Channels with "&" in their name produce invalid XML

For example, Mortise & Tenon Magazine.

The resulting XML

<outline text="Mortise & Tenon Magazine" title="Mortise & Tenon Magazine" type="rss" xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=UCEqwYeNMlleNXKYiUwGN3Bw" />

should be

<outline text="Mortise &amp; Tenon Magazine" title="Mortise &amp; Tenon Magazine" type="rss" xmlUrl="https://www.youtube.com/feeds/videos.xml?channel_id=UCEqwYeNMlleNXKYiUwGN3Bw" />

which has the &s in the outline's text and title replaced with &amp;.

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.