diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | pyproject.toml | 23 | ||||
-rw-r--r-- | setup.cfg | 6 | ||||
-rwxr-xr-x | tests/test_randominfo.py | 14 | ||||
-rwxr-xr-x | tests/test_tokens.py (renamed from test_tokens.py) | 0 | ||||
-rw-r--r-- | yt_dlp_plugins/extractor/radiko.py | 2 |
6 files changed, 38 insertions, 10 deletions
@@ -1,4 +1,5 @@ __pycache__ *.egg-info/ *.pyc -doc/ +wiki/ +dist/ diff --git a/pyproject.toml b/pyproject.toml index 97057d9..0b7ce66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,23 @@ +[project] +name = "yt-dlp-rajiko" +version = "1.0" +description = "improved radiko.jp extractor for yt-dlp" +authors = [ + { name="garret1317" }, +] +requires-python = ">=3.8" +dependencies = ["yt-dlp>=2023.06.22"] +classifiers = [ + "License :: OSI Approved :: Zero-Clause BSD (0BSD)", + "Environment :: Plugins", +] + +[project.urls] +Homepage = "https://427738.xyz/yt-dlp-rajiko/" + [build-system] -requires = ["setuptools"] +requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" -[tool.distutils.bdist_wheel] -universal = true +[tool.setuptools.packages.find] +include = ["yt_dlp_plugins"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5dce721..0000000 --- a/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[metadata] -name = yt-dlp-rajiko -version = 0.3.1 - -[options] -packages = find_namespace: diff --git a/tests/test_randominfo.py b/tests/test_randominfo.py new file mode 100755 index 0000000..bd71fdc --- /dev/null +++ b/tests/test_randominfo.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +import unittest + +from yt_dlp_plugins.extractor import radiko +from yt_dlp import YoutubeDL + + +ie = radiko._RadikoBaseIE() +ydl = YoutubeDL(auto_init=False) +ie.set_downloader(ydl) + +info = ie._generate_random_info() +print("random device info") +print(info) diff --git a/test_tokens.py b/tests/test_tokens.py index ba6475f..ba6475f 100755 --- a/test_tokens.py +++ b/tests/test_tokens.py diff --git a/yt_dlp_plugins/extractor/radiko.py b/yt_dlp_plugins/extractor/radiko.py index 4317ad0..15b49f3 100644 --- a/yt_dlp_plugins/extractor/radiko.py +++ b/yt_dlp_plugins/extractor/radiko.py @@ -19,6 +19,8 @@ import yt_dlp_plugins.extractor.radiko_time as rtime class _RadikoBaseIE(InfoExtractor): + # TODO: replace with importlib.resources when yt-dlp minimum python version is new enough + # https://setuptools.pypa.io/en/latest/userguide/datafiles.html _FULL_KEY = base64.b64decode(""" fAu/s1ySbQBAyfugPCOniGTrMcOu5XqKcup3tmrZUAvx3MGtIIZl7wHokm07yxzL/oR9jdgWhi+e WYVoBIiAG4hDOP5H0Og3Qtd9KFnW8s0N4vNN2DzQ1Y4PqDq3HsQszf4ZaDTkyt4FFW9fPqKUtnVR |