]> jfr.im git - yt-dlp.git/blobdiff - devscripts/make_lazy_extractors.py
Merge 'ytdl-org/youtube-dl/master' release 2020.11.19
[yt-dlp.git] / devscripts / make_lazy_extractors.py
index 9a79c2bc5a6d57f6de31be45b29807e36bd8e12f..c27ef97814e30e6f3053bd9c7c7b70a98e475234 100644 (file)
@@ -1,6 +1,7 @@
 from __future__ import unicode_literals, print_function
 
 from inspect import getsource
+import io
 import os
 from os.path import dirname as dirn
 import sys
@@ -13,8 +14,8 @@
 if os.path.exists(lazy_extractors_filename):
     os.remove(lazy_extractors_filename)
 
-from youtube_dl.extractor import _ALL_CLASSES
-from youtube_dl.extractor.common import InfoExtractor, SearchInfoExtractor
+from youtube_dlc.extractor import _ALL_CLASSES
+from youtube_dlc.extractor.common import InfoExtractor, SearchInfoExtractor
 
 with open('devscripts/lazy_load_template.py', 'rt') as f:
     module_template = f.read()
@@ -59,7 +60,8 @@ def build_lazy_ie(ie, name):
         s += make_valid_template.format(valid_url=ie._make_valid_url())
     return s
 
-# find the correct sorting and add the required base classes so that sublcasses
+
+# find the correct sorting and add the required base classes so that subclasses
 # can be correctly created
 classes = _ALL_CLASSES[:-1]
 ordered_cls = []
@@ -94,5 +96,5 @@ def build_lazy_ie(ie, name):
 
 module_src = '\n'.join(module_contents) + '\n'
 
-with open(lazy_extractors_filename, 'wt') as f:
+with io.open(lazy_extractors_filename, 'wt', encoding='utf-8') as f:
     f.write(module_src)