mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
Merge pull request #651 from junzh0u/gracefully-fail-on-single-video
[youku] gracefully handle single failure when downloading playlist
This commit is contained in:
commit
117915c8bd
@ -6,6 +6,7 @@ from ..extractor import VideoExtractor
|
||||
|
||||
import base64
|
||||
import time
|
||||
import traceback
|
||||
|
||||
class Youku(VideoExtractor):
|
||||
name = "优酷 (Youku)"
|
||||
@ -83,7 +84,13 @@ class Youku(VideoExtractor):
|
||||
self.p_playlist()
|
||||
for video in videos:
|
||||
index = parse_query_param(video, 'f')
|
||||
self.__class__().download_by_url(video, index=index, **kwargs)
|
||||
try:
|
||||
self.__class__().download_by_url(video, index=index, **kwargs)
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user