예제 #1
0
파일: video.py 프로젝트: airekans/Palong
 def downloadVideoFromShortUrlAsync(self, shortUrl):
     try:
         url = yield transformShortUrlAsync(shortUrl)
         video = yield downloadVideoFromUrlAsync(url)
         self.storeVideo(video)
     except BaseException, e:
         print "[%d] exception:" % self.__count, e
예제 #2
0
파일: video_cb.py 프로젝트: airekans/Palong
        def downloadVideoFromUrl(url):
            d = downloadVideoFromUrlAsync(url)

            def errDownloadVideoFromUrl(err):
                print "[%d] exception:" % self.__count, err
            
            d.addCallbacks(lambda v: self.storeVideo(v), errDownloadVideoFromUrl)