kabigon 0.4.0__py3-none-any.whl → 0.4.1__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/youtube.py +10 -0
- {kabigon-0.4.0.dist-info → kabigon-0.4.1.dist-info}/METADATA +2 -1
- {kabigon-0.4.0.dist-info → kabigon-0.4.1.dist-info}/RECORD +6 -6
- {kabigon-0.4.0.dist-info → kabigon-0.4.1.dist-info}/WHEEL +0 -0
- {kabigon-0.4.0.dist-info → kabigon-0.4.1.dist-info}/entry_points.txt +0 -0
- {kabigon-0.4.0.dist-info → kabigon-0.4.1.dist-info}/licenses/LICENSE +0 -0
kabigon/youtube.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
from urllib.parse import parse_qs
|
2
2
|
from urllib.parse import urlparse
|
3
3
|
|
4
|
+
import aioytt
|
4
5
|
import timeout_decorator
|
5
6
|
from youtube_transcript_api import YouTubeTranscriptApi
|
6
7
|
|
@@ -90,3 +91,12 @@ class YoutubeLoader(Loader):
|
|
90
91
|
if text:
|
91
92
|
lines.append(text)
|
92
93
|
return "\n".join(lines)
|
94
|
+
|
95
|
+
async def async_load(self, url: str) -> str:
|
96
|
+
transcript = await aioytt.get_transcript_from_url(url)
|
97
|
+
lines = []
|
98
|
+
for piece in transcript:
|
99
|
+
text = piece.text.strip()
|
100
|
+
if text:
|
101
|
+
lines += text
|
102
|
+
return "\n".join(lines)
|
@@ -1,9 +1,10 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: kabigon
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.1
|
4
4
|
Author-email: narumi <toucans-cutouts0f@icloud.com>
|
5
5
|
License-File: LICENSE
|
6
6
|
Requires-Python: >=3.10
|
7
|
+
Requires-Dist: aioytt>=0.2.4
|
7
8
|
Requires-Dist: click>=8.1.8
|
8
9
|
Requires-Dist: cloudscraper>=1.2.71
|
9
10
|
Requires-Dist: httpx>=0.28.1
|
@@ -10,10 +10,10 @@ kabigon/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
10
10
|
kabigon/reel.py,sha256=1JTcn7qVH7FcD0Oj-Rz-pnjI-xS1UtkoJcuClGb8ExQ,1124
|
11
11
|
kabigon/singlefile.py,sha256=CeTT2WPYm0vb1xWPNdyBN4uHRw9hRqfZm68D-nEcUA8,1800
|
12
12
|
kabigon/utils.py,sha256=eNTLtHLSB2erDac2HH3jWemgfr8Ou_ozwVb8h9BD-4g,922
|
13
|
-
kabigon/youtube.py,sha256=
|
13
|
+
kabigon/youtube.py,sha256=M1v7t4VS72ItqaNJTwlv59bafqORqldGjNzptZOeybA,2915
|
14
14
|
kabigon/ytdlp.py,sha256=kG1fXqU650otOWespjOSkGK_-jk1wO-sWiR60_UPJxY,3125
|
15
|
-
kabigon-0.4.
|
16
|
-
kabigon-0.4.
|
17
|
-
kabigon-0.4.
|
18
|
-
kabigon-0.4.
|
19
|
-
kabigon-0.4.
|
15
|
+
kabigon-0.4.1.dist-info/METADATA,sha256=IfnrNBC17ac0E4aI9Y-VOWhaiOnMN_RZxhoS-_EvhzA,1049
|
16
|
+
kabigon-0.4.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
17
|
+
kabigon-0.4.1.dist-info/entry_points.txt,sha256=O3FYAO9w-NQvlGMJrBvtrnGHSK2QkUnQBTa30YXRbVE,45
|
18
|
+
kabigon-0.4.1.dist-info/licenses/LICENSE,sha256=H2T3_RTgmcngMeC7p_SXT3GwBLkd2DaNgAZuxulcfiA,1066
|
19
|
+
kabigon-0.4.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|