Skip to content

Instantly share code, notes, and snippets.

@airekans
Created July 24, 2012 01:34
Show Gist options
  • Save airekans/3167380 to your computer and use it in GitHub Desktop.
Save airekans/3167380 to your computer and use it in GitHub Desktop.
sync video server
def stringReceived(self, shortUrl):
self.transport.loseConnection()
self.downloadVideoFromShortUrl(shortUrl)
def downloadVideoFromShortUrl(self, shortUrl):
try:
url = transformShortUrl(shortUrl)
video = downloadVideoFromUrl(url)
storeVideo(video)
except BaseException, e:
print "exception:", e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment