mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 12:01:28 +00:00
lazy extractors: Fix building with python2.6
This commit is contained in:
parent
0d778b1db9
commit
c1ce6acdd7
|
@ -30,7 +30,7 @@ class {name}(LazyLoadExtractor):
|
||||||
make_valid_template = '''
|
make_valid_template = '''
|
||||||
@classmethod
|
@classmethod
|
||||||
def _make_valid_url(cls):
|
def _make_valid_url(cls):
|
||||||
return {!r}
|
return {valid_url!r}
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ def build_lazy_ie(ie, name):
|
||||||
s += getsource(ie.suitable)
|
s += getsource(ie.suitable)
|
||||||
if hasattr(ie, '_make_valid_url'):
|
if hasattr(ie, '_make_valid_url'):
|
||||||
# search extractors
|
# search extractors
|
||||||
s += make_valid_template.format(ie._make_valid_url())
|
s += make_valid_template.format(valid_url=ie._make_valid_url())
|
||||||
return s
|
return s
|
||||||
|
|
||||||
names = []
|
names = []
|
||||||
|
@ -55,7 +55,7 @@ def build_lazy_ie(ie, name):
|
||||||
names.append(name)
|
names.append(name)
|
||||||
|
|
||||||
module_contents.append(
|
module_contents.append(
|
||||||
'_ALL_CLASSES = [{}]'.format(', '.join(names)))
|
'_ALL_CLASSES = [{0}]'.format(', '.join(names)))
|
||||||
|
|
||||||
module_src = '\n'.join(module_contents)
|
module_src = '\n'.join(module_contents)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue