projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lazy extractors: specify the encoding
[youtube-dl]
/
youtube_dl
/
YoutubeDL.py
diff --git
a/youtube_dl/YoutubeDL.py
b/youtube_dl/YoutubeDL.py
index cd0805303b7f56228bfce502300c938e66c73830..f18a8e840553528703e79cf3dd2415173a568d0e 100755
(executable)
--- a/
youtube_dl/YoutubeDL.py
+++ b/
youtube_dl/YoutubeDL.py
@@
-82,7
+82,7
@@
from .utils import (
YoutubeDLHandler,
)
from .cache import Cache
YoutubeDLHandler,
)
from .cache import Cache
-from .extractor import get_info_extractor, gen_extractors
+from .extractor import get_info_extractor, gen_extractor
_classe
s
from .downloader import get_suitable_downloader
from .downloader.rtmp import rtmpdump_version
from .postprocessor import (
from .downloader import get_suitable_downloader
from .downloader.rtmp import rtmpdump_version
from .postprocessor import (
@@
-378,8
+378,9
@@
class YoutubeDL(object):
def add_info_extractor(self, ie):
"""Add an InfoExtractor object to the end of the list."""
self._ies.append(ie)
def add_info_extractor(self, ie):
"""Add an InfoExtractor object to the end of the list."""
self._ies.append(ie)
- self._ies_instances[ie.ie_key()] = ie
- ie.set_downloader(self)
+ if not isinstance(ie, type):
+ self._ies_instances[ie.ie_key()] = ie
+ ie.set_downloader(self)
def get_info_extractor(self, ie_key):
"""
def get_info_extractor(self, ie_key):
"""
@@
-397,7
+398,7
@@
class YoutubeDL(object):
"""
Add the InfoExtractors returned by gen_extractors to the end of the list
"""
"""
Add the InfoExtractors returned by gen_extractors to the end of the list
"""
- for ie in gen_extractors():
+ for ie in gen_extractor
_classe
s():
self.add_info_extractor(ie)
def add_post_processor(self, pp):
self.add_info_extractor(ie)
def add_post_processor(self, pp):
@@
-661,6
+662,7
@@
class YoutubeDL(object):
if not ie.suitable(url):
continue
if not ie.suitable(url):
continue
+ ie = self.get_info_extractor(ie.ie_key())
if not ie.working():
self.report_warning('The program functionality for this site has been marked as broken, '
'and will probably not work.')
if not ie.working():
self.report_warning('The program functionality for this site has been marked as broken, '
'and will probably not work.')