m-rei / youtube-opml-exporter-script Goto Github PK
View Code? Open in Web Editor NEWGreasemonkey firefox addon script restoring RSS exporter functionality for youtube, which has been recently removed
Greasemonkey firefox addon script restoring RSS exporter functionality for youtube, which has been recently removed
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:
When the script loads, check the page to see if there are any continuationItemRenderer
s, make the POST request that they would make, and wait for the new content to load. Repeat until there are no new continuationItemRenderer
s, then parse the page for channels.
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.
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.
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 & Tenon Magazine" title="Mortise & 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 &
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.