Skip to content

Instantly share code, notes, and snippets.

View nathangathright's full-sized avatar
🎧
Full of information. Some of it's actually useful.

Nathan Gathright nathangathright

🎧
Full of information. Some of it's actually useful.
View GitHub Profile
<podcast:images
type="image/jpeg"
aspect-ratio="1/1"
srcset="https://example.com/images/ep1/pci_square-massive.jpg 1500w,
https://example.com/images/ep1/pci_square-middle.jpg 600w,
https://example.com/images/ep1/pci_square-small.jpg 300w,
https://example.com/images/ep1/pci_square-tiny.jpg 150w"
/>
<podcast:images
type="image/jpeg"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Name Slug Hostname
Amazon Music amazon music.amazon.com
Antennapod antennapod antennapod.org
Anytime Player anytimeplayer anytimeplayer.app
Apple Podcasts apple podcasts.apple.com
Audacy audacy audacy.com
Audible audible audible.com
Bullhorn bullhorn bullhorn.fm
Castamatic castamatic castamatic.com
Castbox castbox castbox.fm
@nathangathright
nathangathright / deepgram.py
Last active April 12, 2023 17:39
Convert Deepgram JSON to PodcastNamespace JSON
# convert deepgram json to PodcastNamespace json
# Usage: python deepgram.py <input.json>
import json
import sys
# load json
with open(sys.argv[1]) as f:
data = json.load(f)

WebFinger-esque lookup for podcasts

Example Request

GET /.well-known/webfinger?
feed=https://feeds.megaphone.fm/vergecast&
episode=74c2d4a8-350e-11ed-ac6e-af51166da149&
episode=2976ce64-49ae-11ed-a6dc-63e170f0bbd8
<img src="http://SUBDOMAIN.DOMAIN.COM/hash/283379236/128" data-fallback="/feed/b9cd9278-2679-5cfd-9bc7-7f1e04f1cba4/item/f8e00bc8-9f47-11ec-adea-33b8a6094f44/128">
<script>
let podcastimages = document.querySelectorAll('[data-fallback]');
podcastimages.forEach(image => {
image.addEventListener("error", (event) => {
image.src!=image.dataset.fallback ? image.src=image.dataset.fallback : false;
})
});
</script>
javascript:!function(a){var b=document.createElement("textarea"),c=document.getSelection();b.textContent=a,document.body.appendChild(b),c.removeAllRanges(),b.select(),document.execCommand("copy"),c.removeAllRanges(),document.body.removeChild(b)}(document.querySelector("meta[property='og:image']").content);

Bookmarklets

Google Cache

data:text/html;charset=utf-8,<html><head><link rel="shortcut icon" href="https://www.google.com/favicon.ico"><script type="text/javascript"> javascript:location.href='http://webcache.googleusercontent.com/search?q=cache:'+window.location.href%0A</script>

Archive.org

data:text/html;charset=utf-8,