mirror of
https://github.com/yt-dlp/ejs.git
synced 2026-06-13 00:32:11 +00:00
Namespace packages
This commit is contained in:
@@ -1,25 +1,6 @@
|
||||
import importlib.resources
|
||||
|
||||
import yt_dlp_ejs
|
||||
# XXX: this reflects package version
|
||||
from yt_dlp_ejs._version import version
|
||||
|
||||
|
||||
def yt_solver_core() -> str:
|
||||
"""
|
||||
Read the contents of the JavaScript core solver bundle as string.
|
||||
"""
|
||||
return importlib.resources.read_text(yt_dlp_ejs, 'yt.solver.core.min.js')
|
||||
|
||||
|
||||
def yt_solver_lib() -> str:
|
||||
"""
|
||||
Read the contents of the JavaScript library solver bundle as string.
|
||||
"""
|
||||
return importlib.resources.read_text(yt_dlp_ejs, 'yt.solver.lib.min.js')
|
||||
|
||||
__all__ = [
|
||||
"core",
|
||||
"lib",
|
||||
"version",
|
||||
]
|
||||
|
||||
0
yt_dlp_ejs/yt/__init__.py
Normal file
0
yt_dlp_ejs/yt/__init__.py
Normal file
17
yt_dlp_ejs/yt/solver/__init__.py
Normal file
17
yt_dlp_ejs/yt/solver/__init__.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import importlib
|
||||
|
||||
import yt_dlp_ejs.yt.solver
|
||||
|
||||
|
||||
def core() -> str:
|
||||
"""
|
||||
Read the contents of the JavaScript core solver bundle as string.
|
||||
"""
|
||||
return importlib.resources.read_text(yt_dlp_ejs.yt.solver, "core.min.js")
|
||||
|
||||
|
||||
def lib() -> str:
|
||||
"""
|
||||
Read the contents of the JavaScript library solver bundle as string.
|
||||
"""
|
||||
return importlib.resources.read_text(yt_dlp_ejs.yt.solver, "lib.min.js")
|
||||
Reference in New Issue
Block a user