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