Skip to content

Instantly share code, notes, and snippets.

@st3b1t
Created October 9, 2023 12:31
Show Gist options
  • Save st3b1t/aec9ea1f1d3488110972dbe67b554222 to your computer and use it in GitHub Desktop.
Save st3b1t/aec9ea1f1d3488110972dbe67b554222 to your computer and use it in GitHub Desktop.
podcast rss feed widget
<html>
<head></head>
<body>
<h1>Podcast RSS Box</h1>
<div id="feed" style="max-width: 50%;border:1px solid blue;padding:10px">
</div>
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
<script>
const url = 'https://anchor.fm/s/bd5d5b20/podcast/rss'
$(() => {
$.get(url)
.done(xml => {
$.each($("item", xml), (num, item) => {
var link = $(item).find('link').text()
, title = $(item).find('title').text();
$(`<div class="item"><a href="${link}"> ${num}. ${title}</a></div>`).appendTo("#feed");
});
});
});
</script>
</body>
</html>
@st3b1t
Copy link
Author

st3b1t commented Oct 9, 2023

for CORS problem solve using this:
https://corsproxy.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment