Due to changes to the YouTube website, this script is now obsolete. An updated version is availaible here
To generate an OPML file containing RSS feeds of your YouTube subscriptions:
Navigate to https://www.youtube.com/feed/channels, and scroll the page to make sure links to every channel are loaded.Run the script or activate the bookmarklet. An OPML file will download, and a list of RSS feeds will be logged to the console if you need it.
Works in Chrome, Firefox and Safari as of May 2023.
thanks. when you have too many subscriptions over youtube 1 page, you have to scroll it down manually to the bottom first then run the script.
Then I go to this opml-gen.ovh website to generate OPML file then go the feedly OPML import page. Successfully imported all of my youtube subscriptions into my RSS reader feedly.