mirror of
https://github.com/yt-dlp/ejs.git
synced 2026-07-04 03:50:57 +00:00
Use importlib.resources.files() api (#15)
This commit is contained in:
@@ -7,11 +7,11 @@ 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")
|
||||
return (importlib.resources.files(yt_dlp_ejs.yt.solver) / "core.min.js").read_text()
|
||||
|
||||
|
||||
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")
|
||||
return (importlib.resources.files(yt_dlp_ejs.yt.solver) / "lib.min.js").read_text()
|
||||
|
||||
Reference in New Issue
Block a user