Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save barryels/ec6eb54c76a4275e85d3f628853cd00d to your computer and use it in GitHub Desktop.
Save barryels/ec6eb54c76a4275e85d3f628853cd00d to your computer and use it in GitHub Desktop.
Export Google Podcasts subscription list to OPML
// 1. Visit https://podcasts.google.com/subscriptions
// 2. Open your browser's JavaScript console
// 3. Copy-paste the below snippet and press enter:
console.log(`<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<opml version="1.0">
<head>
<title>Google Podcasts Feeds</title>
</head>
<body>
<outline text="feeds">
${[].map
.call(document.querySelector("scrolling-carousel").querySelectorAll(`a`), (feedLink) => {
const rssFeedEncodedURL = feedLink
.getAttribute("href")
.split("./feed/")[1]
.split("?")[0];
const rssFeedName = feedLink.querySelector("img").getAttribute("alt");
return {
name: rssFeedName,
url: atob(rssFeedEncodedURL),
};
})
.map((feed) => {
return `<outline type="rss" text="${feed.name}" xmlUrl="${feed.url}" />`;
}).join("\n")
}
</outline>
</body>
</opml>`);
// 4. Copy-paste the result into a new file, e.g. google-podcasts.xml
// 5. Import the file into your new podcast player
// Notes:
// - Sometimes a specific feed URL has a `&` or other symbol that might break the import. Some manual editing might be required, but at least this is quicker than doing it manually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment