My workplace filters our internet traffic by forcing us to go through a proxy, and unfortunately sites such as IT Conversations and Libsyn are blocked. However, mp3 files in general are not filtered, if they come from sites not on the proxy's blacklist.
So is there a website somewhere that will let me give it a URL and then download the MP3 at that URL and send it my way, thus slipping through the proxy?
Alternatively, is there some other easy way for me to get the mp3 files for these podcasts from work?
EDIT and UPDATE: Since I've gotten downvoted a few times, perhaps I should explain/justify my situation. I'm a contractor working at a government facility, and we use some commercial filtering software which is very aggressive and overzealous. My boss is fine with me listening to podcasts at work and is fine with me circumventing the proxy filtering, and doesn't want to deal with the significant red tape (it's the government after all) associated with getting the IT department to make an exception for IT Conversations or the Java Posse, etc. So I feel that this is an important and relevant question for programmers.
Unfortunately, all of the proxy websites for bypassing web filters have also been blocked, so I may have to download the podcasts I like at home in advance and then bring them into work. If can tell me about a lesser-known service I can try which might not be blocked, I'd appreciate it.
I ended up writing an extremely dumb-and-simple cgi-script and hosting it on my web server, with a script on my work computer to get at it. Here's the CGI script:
#!/usr/local/bin/python
import cgitb; cgitb.enable()
import cgi
from urllib2 import urlopen
def tohex(data):
return "".join(hex(ord(char))[2:].rjust(2,"0") for char in data)
def fromhex(encoded):
data = ""
while encoded:
data += chr(int(encoded[:2], 16))
encoded = encoded[2:]
return data
if __name__=="__main__":
print("Content-type: text/plain")
print("")
url = fromhex( cgi.FieldStorage()["target"].value )
contents = urlopen(url).read()
for i in range(len(contents)/40+1):
print( tohex(contents[40*i:40*i+40]) )
and here's the client script used to download the podcasts:
#!/usr/bin/env python2.6
import os
from sys import argv
from urllib2 import build_opener, ProxyHandler
if os.fork():
exit()
def tohex(data):
return "".join(hex(ord(char))[2:].rjust(2,"0") for char in data)
def fromhex(encoded):
data = ""
while encoded:
data += chr(int(encoded[:2], 16))
encoded = encoded[2:]
return data
if __name__=="__main__":
if len(argv) < 2:
print("usage: %s URL [FILENAME]" % argv[0])
quit()
os.chdir("/home/courtwright/mp3s")
url = "http://example.com/cgi-bin/hex.py?target=%s" % tohex(argv[1])
fname = argv[2] if len(argv)>2 else argv[1].split("/")[-1]
with open(fname, "wb") as dest:
for line in build_opener(ProxyHandler({"http":"proxy.example.com:8080"})).open(url):
dest.write( fromhex(line.strip()) )
dest.flush()