Skip to content

Instantly share code, notes, and snippets.

@amussey amussey/README.md
Created May 26, 2015

Embed
What would you like to do?
Distorted View Webscript.io PocketCast Fix

PocketCast + SuperFreak Sideshow

The following script will allow you to use PocketCast with the Distorted View Superfreak Sideshow RSS feed. Simply plug it in to a Webscript.io endpoint with your username and password and point PocketCast at it.

feed = "http://www.superfreaksideshow.com/members3/wp-content/plugins/s2member-files/s2member-file-inline/s2member-file-remote/podcast.xml"
username = "USERNAME"
password = "PASSWORD"
function url_encode(str)
if (str) then
str = string.gsub (str, "\n", "\r\n")
str = string.gsub (str, "([^%w %-%_%.%~])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
str = string.gsub (str, " ", "+")
end
return str
end
encoded_pass, _ = (url_encode(username) .. ":" .. url_encode(password) .. "@www.superfreaksideshow.com"):gsub("%%", "%%%%")
encoded_pass_enclosure, _ = ("enclosure url=\"http://" .. url_encode(username) .. ":" .. url_encode(password) .. "@www.superfreaksideshow.com"):gsub("%%", "%%%%")
password_encoded_url, _ = feed:gsub("www.superfreaksideshow.com", encoded_pass)
local dv_feed = http.request {
url = password_encoded_url
}
dv_feed, _ = dv_feed.content:gsub("enclosure url=\"http://www.superfreaksideshow.com", encoded_pass_enclosure)
return dv_feed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.