projects
/
youtube-dl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ae2bd27012ff27891f0757b88824bc7185d3e875
[youtube-dl]
/
devscripts
/
lazy_load_template.py
1
# flake8: noqa
2
from __future__ import unicode_literals
3
4
import re
5
6
7
class LazyLoadExtractor(object):
8
_module = None
9
10
@classmethod
11
def ie_key(cls):
12
return cls.__name__[:-2]
13
14
def __new__(cls):
15
mod = __import__(cls._module, fromlist=(cls.__name__,))
16
real_cls = getattr(mod, cls.__name__)
17
return real_cls.__new__(real_cls)