Huffduffing for podcasters
--
I was pointed to this discussion thread which is talking about how to make podcast episodes findable for services like Huffduffer.
The logic behind Huffduffer’s bookmarklet goes something like this…
- Find any a elements that have href values ending in “.mp3” or “.m4a”.
- If there’s just one audio on the page, use that.
- If there are multiple audio, offer a list to the user and have them choose.
If that doesn’t work…
- Look for a link element with a rel value of “enclosure”.
- Look for a meta element property value of “og:audio”.
- Look for audio elements and grab either the src attribute of the element itself, or the src attribute of any source elements within the audio element.
If that doesn’t work…
- Try to find a link to an RSS feed (a link that looks like “rss” or “feed” or “atom”).
- If there is a feed, parse that for enclosure elements and present that list to the user.
That covers 80–90% of use cases. There are still situations where the actual audio file for a podcast episode is heavily obfuscated — either with clickjacking JavaScript “download” links, or links that point to a redirection to the actual file.
If you have a podcast and you want your episodes to be sharable and huffduffable, you have a few options:
Have a link to the audio file for the episode somewhere on the page, something like:
<a href="/path/to/file.mp3">download</a>
That’s the simplest option. If you’re hosting with Soundcloud, this is pretty much impossible to accomplish: they deliberately obfuscate and time-limit the audio file, even if you want it to be downloadable (that “download” link literally only allows a user to download that file in that moment).
If you don’t want a visible link on the page, you could use metadata in the head of your document. Either:
<link rel="enclosure" href="/path/to/file.mp3">
Or:
<meta property="og:audio" content="/path/to/file.mp3">
And if you want to encourage people to huffduff an episode of your podcast, you can also include a “huffduff it” link, like this:
<a href="https://huffduffer.com/add?page=referrer">huffduff it</a>
You can also use ?page=referer — that misspelling has become canonised thanks to HTTP.
There you go, my podcasting friends. However you decide to do it, I hope you’ll make your episodes sharable.
This was originally posted on my own site.