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.
https://talk.automators.fm/t/generate-opml-from-a-list-of-rss-feed-urls/2493/2
🥳