Created
October 9, 2023 12:31
-
-
Save st3b1t/aec9ea1f1d3488110972dbe67b554222 to your computer and use it in GitHub Desktop.
podcast rss feed widget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for CORS problem solve using this:
https://corsproxy.io/