]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/compat/compat_utils.py
[ie/podbayfm] Fix extraction (#10195)
[yt-dlp.git] / yt_dlp / compat / compat_utils.py
index 8956b3bf1f7a64b25cd97be5e0f06a0c506e077e..d62b7d0488dc9510cd9c5ffb1a5d3f8d2f834c72 100644 (file)
@@ -15,7 +15,7 @@ def get_package_info(module):
         name=getattr(module, '_yt_dlp__identifier', module.__name__),
         version=str(next(filter(None, (
             getattr(module, attr, None)
-            for attr in ('__version__', 'version_string', 'version')
+            for attr in ('_yt_dlp__version', '__version__', 'version_string', 'version')
         )), None)))
 
 
@@ -48,7 +48,7 @@ def passthrough_module(parent, child, allowed_attributes=(..., ), *, callback=la
     """Passthrough parent module into a child module, creating the parent if necessary"""
     def __getattr__(attr):
         if _is_package(parent):
-            with contextlib.suppress(ImportError):
+            with contextlib.suppress(ModuleNotFoundError):
                 return importlib.import_module(f'.{attr}', parent.__name__)
 
         ret = from_child(attr)