[youku] gracefully handle single failure

This commit is contained in:
Jun Zhou 2015-09-15 03:47:41 -04:00
parent 20ebd902e0
commit fc93524cc3

View File

@ -6,6 +6,7 @@ from ..extractor import VideoExtractor
import base64
import time
import traceback
class Youku(VideoExtractor):
name = "优酷 (Youku)"
@ -83,7 +84,11 @@ class Youku(VideoExtractor):
self.p_playlist()
for video in videos:
index = parse_query_param(video, 'f')
try:
self.__class__().download_by_url(video, index=index, **kwargs)
except:
exc_type, exc_value, exc_traceback = sys.exc_info()
traceback.print_exception(exc_type, exc_value, exc_traceback)
def prepare(self, **kwargs):
assert self.url or self.vid