mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
Youku: fix a regression bug which caused '-y' not work
* d6ec844
is not implemented correctly (unfortunately)
This commit is contained in:
parent
655e26acd1
commit
c63155a334
@ -33,6 +33,8 @@ class VideoExtractor():
|
|||||||
if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']:
|
if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']:
|
||||||
set_proxy(parse_host(kwargs['extractor_proxy']))
|
set_proxy(parse_host(kwargs['extractor_proxy']))
|
||||||
self.prepare(**kwargs)
|
self.prepare(**kwargs)
|
||||||
|
if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']:
|
||||||
|
unset_proxy()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.streams_sorted = [dict([('id', stream_type['id'])] + list(self.streams[stream_type['id']].items())) for stream_type in self.__class__.stream_types if stream_type['id'] in self.streams]
|
self.streams_sorted = [dict([('id', stream_type['id'])] + list(self.streams[stream_type['id']].items())) for stream_type in self.__class__.stream_types if stream_type['id'] in self.streams]
|
||||||
@ -41,9 +43,6 @@ class VideoExtractor():
|
|||||||
|
|
||||||
self.extract(**kwargs)
|
self.extract(**kwargs)
|
||||||
|
|
||||||
if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']:
|
|
||||||
unset_proxy()
|
|
||||||
|
|
||||||
self.download(**kwargs)
|
self.download(**kwargs)
|
||||||
|
|
||||||
def download_by_vid(self, vid, **kwargs):
|
def download_by_vid(self, vid, **kwargs):
|
||||||
@ -52,6 +51,8 @@ class VideoExtractor():
|
|||||||
if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']:
|
if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']:
|
||||||
set_proxy(parse_host(kwargs['extractor_proxy']))
|
set_proxy(parse_host(kwargs['extractor_proxy']))
|
||||||
self.prepare(**kwargs)
|
self.prepare(**kwargs)
|
||||||
|
if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']:
|
||||||
|
unset_proxy()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.streams_sorted = [dict([('id', stream_type['id'])] + list(self.streams[stream_type['id']].items())) for stream_type in self.__class__.stream_types if stream_type['id'] in self.streams]
|
self.streams_sorted = [dict([('id', stream_type['id'])] + list(self.streams[stream_type['id']].items())) for stream_type in self.__class__.stream_types if stream_type['id'] in self.streams]
|
||||||
@ -59,8 +60,6 @@ class VideoExtractor():
|
|||||||
self.streams_sorted = [dict([('itag', stream_type['itag'])] + list(self.streams[stream_type['itag']].items())) for stream_type in self.__class__.stream_types if stream_type['itag'] in self.streams]
|
self.streams_sorted = [dict([('itag', stream_type['itag'])] + list(self.streams[stream_type['itag']].items())) for stream_type in self.__class__.stream_types if stream_type['itag'] in self.streams]
|
||||||
|
|
||||||
self.extract(**kwargs)
|
self.extract(**kwargs)
|
||||||
if 'extractor_proxy' in kwargs and kwargs['extractor_proxy']:
|
|
||||||
unset_proxy()
|
|
||||||
|
|
||||||
self.download(**kwargs)
|
self.download(**kwargs)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user