kabigon 0.8.3__py3-none-any.whl → 0.8.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kabigon/__init__.py +1 -0
- kabigon/youtube_ytdlp.py +18 -0
- {kabigon-0.8.3.dist-info → kabigon-0.8.5.dist-info}/METADATA +1 -2
- {kabigon-0.8.3.dist-info → kabigon-0.8.5.dist-info}/RECORD +7 -6
- {kabigon-0.8.3.dist-info → kabigon-0.8.5.dist-info}/WHEEL +0 -0
- {kabigon-0.8.3.dist-info → kabigon-0.8.5.dist-info}/entry_points.txt +0 -0
- {kabigon-0.8.3.dist-info → kabigon-0.8.5.dist-info}/licenses/LICENSE +0 -0
kabigon/__init__.py
CHANGED
@@ -14,6 +14,7 @@ from .ptt import PttLoader
|
|
14
14
|
from .reel import ReelLoader
|
15
15
|
from .twitter import TwitterLoader
|
16
16
|
from .youtube import YoutubeLoader
|
17
|
+
from .youtube_ytdlp import YoutubeYtdlpLoader
|
17
18
|
from .ytdlp import YtdlpLoader
|
18
19
|
|
19
20
|
LOGURU_LEVEL: Final[str] = os.getenv("LOGURU_LEVEL", "INFO")
|
kabigon/youtube_ytdlp.py
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
from urllib.parse import urlparse
|
2
|
+
|
3
|
+
from .loader import Loader
|
4
|
+
from .ytdlp import YtdlpLoader
|
5
|
+
|
6
|
+
|
7
|
+
def check_youtube_url(url: str) -> None:
|
8
|
+
if urlparse(url).netloc not in ["youtube.com", "youtu.be"]:
|
9
|
+
raise ValueError(f"URL must be from youtube.com or youtu.be, got {url}")
|
10
|
+
|
11
|
+
|
12
|
+
class YoutubeYtdlpLoader(Loader):
|
13
|
+
def __init__(self) -> None:
|
14
|
+
self.ytdlp_loader = YtdlpLoader()
|
15
|
+
|
16
|
+
def load(self, url: str) -> str:
|
17
|
+
check_youtube_url(url)
|
18
|
+
return self.ytdlp_loader.load(url)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: kabigon
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.5
|
4
4
|
Author-email: narumi <toucans-cutouts0f@icloud.com>
|
5
5
|
License-File: LICENSE
|
6
6
|
Requires-Python: >=3.10
|
@@ -9,7 +9,6 @@ Requires-Dist: firecrawl-py>=2.4.1
|
|
9
9
|
Requires-Dist: httpx>=0.28.1
|
10
10
|
Requires-Dist: loguru>=0.7.3
|
11
11
|
Requires-Dist: markdownify>=0.14.1
|
12
|
-
Requires-Dist: numpy>=2.2.5
|
13
12
|
Requires-Dist: pypdf>=5.3.0
|
14
13
|
Requires-Dist: rich>=13.9.4
|
15
14
|
Requires-Dist: typer>=0.15.3
|
@@ -1,4 +1,4 @@
|
|
1
|
-
kabigon/__init__.py,sha256=
|
1
|
+
kabigon/__init__.py,sha256=SUgCaELSHz-omY22-3aJnqyz2usODR2G8pN-lRi-6zs,606
|
2
2
|
kabigon/cli.py,sha256=PJ0wnwp_AgHA54YxGr1jNJ_q3ls7fEymgTJaJxCVU7M,650
|
3
3
|
kabigon/compose.py,sha256=Kb6_-SNeh08QELMF-r3mWxasDTxJBuJJQamFPLcwQ1I,1463
|
4
4
|
kabigon/firecrawl.py,sha256=-5AI9tla_684dtpubY_BRudqLgw28158WdwA1RjJvAA,778
|
@@ -12,9 +12,10 @@ kabigon/reel.py,sha256=qOwWCvcp7xNKg0JDunq_Bsl8yqqMzrnAOI9k5mSqrOU,874
|
|
12
12
|
kabigon/twitter.py,sha256=aRqAiFxIwln6lteWdoF6SmvbzO62yBTQRzcB7UcVJwk,1046
|
13
13
|
kabigon/utils.py,sha256=eNTLtHLSB2erDac2HH3jWemgfr8Ou_ozwVb8h9BD-4g,922
|
14
14
|
kabigon/youtube.py,sha256=F9GpLa0iUy03wYU94RrrnrXa6ExqbG6CZpqx5bPENWE,1106
|
15
|
+
kabigon/youtube_ytdlp.py,sha256=-kElnrP4cLhZz2kNtgp2-ijA8I-IpnRctZ1JNCDN7pw,503
|
15
16
|
kabigon/ytdlp.py,sha256=OGVrKRGXY_eHePgDmN52Kkui12NN44LsIPonD_61QBM,1501
|
16
|
-
kabigon-0.8.
|
17
|
-
kabigon-0.8.
|
18
|
-
kabigon-0.8.
|
19
|
-
kabigon-0.8.
|
20
|
-
kabigon-0.8.
|
17
|
+
kabigon-0.8.5.dist-info/METADATA,sha256=9HQxSaVfIWMcq5Q6JerjvFWw5yehP294nZaWDH0b1qQ,1264
|
18
|
+
kabigon-0.8.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
19
|
+
kabigon-0.8.5.dist-info/entry_points.txt,sha256=O3FYAO9w-NQvlGMJrBvtrnGHSK2QkUnQBTa30YXRbVE,45
|
20
|
+
kabigon-0.8.5.dist-info/licenses/LICENSE,sha256=H2T3_RTgmcngMeC7p_SXT3GwBLkd2DaNgAZuxulcfiA,1066
|
21
|
+
kabigon-0.8.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|