academia-mcp 1.10.8__py3-none-any.whl → 1.10.9__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.
- academia_mcp/tools/yt_transcript.py +6 -3
- {academia_mcp-1.10.8.dist-info → academia_mcp-1.10.9.dist-info}/METADATA +1 -1
- {academia_mcp-1.10.8.dist-info → academia_mcp-1.10.9.dist-info}/RECORD +7 -7
- {academia_mcp-1.10.8.dist-info → academia_mcp-1.10.9.dist-info}/WHEEL +0 -0
- {academia_mcp-1.10.8.dist-info → academia_mcp-1.10.9.dist-info}/entry_points.txt +0 -0
- {academia_mcp-1.10.8.dist-info → academia_mcp-1.10.9.dist-info}/licenses/LICENSE +0 -0
- {academia_mcp-1.10.8.dist-info → academia_mcp-1.10.9.dist-info}/top_level.txt +0 -0
@@ -13,8 +13,8 @@ def yt_transcript(video_url: str) -> str:
|
|
13
13
|
Args:
|
14
14
|
video_url (str): YouTube video URL.
|
15
15
|
"""
|
16
|
-
if "youtu.be" in video_url:
|
17
|
-
video_id = video_url.strip().split("youtu.be/")[1]
|
16
|
+
if "youtu.be/" in video_url:
|
17
|
+
video_id = video_url.strip().split("youtu.be/")[-1]
|
18
18
|
else:
|
19
19
|
video_id = video_url.strip().split("v=")[-1]
|
20
20
|
video_id = video_id.split("?")[0]
|
@@ -25,6 +25,9 @@ def yt_transcript(video_url: str) -> str:
|
|
25
25
|
proxy_password=settings.WEBSHARE_PROXY_PASSWORD,
|
26
26
|
)
|
27
27
|
api = YouTubeTranscriptApi(proxy_config=proxy_config)
|
28
|
-
|
28
|
+
try:
|
29
|
+
transcript = api.fetch(video_id)
|
30
|
+
except Exception as e:
|
31
|
+
return f"Error fetching transcript for video {video_url}: {e}"
|
29
32
|
snippets = transcript.snippets
|
30
33
|
return "\n".join([f"{int(entry.start)}: {' '.join(entry.text.split())}" for entry in snippets])
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: academia-mcp
|
3
|
-
Version: 1.10.
|
3
|
+
Version: 1.10.9
|
4
4
|
Summary: MCP server that provides different tools to search for scientific publications
|
5
5
|
Author-email: Ilya Gusev <phoenixilya@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/IlyaGusev/academia_mcp
|
@@ -24,10 +24,10 @@ academia_mcp/tools/show_image.py,sha256=jiJlQ53dbZ0T61OBhCT3IKVvBl9NHc6jHgWLfg5B
|
|
24
24
|
academia_mcp/tools/speech_to_text.py,sha256=YZzMqdvunzXkpcadP_mYhm6cs4qH1Y_42SfY-7eX4O4,1601
|
25
25
|
academia_mcp/tools/visit_webpage.py,sha256=swlFwWRzWc7-AHP2ouRZJScSTA4dHZ32fuJnA2V0lUc,3311
|
26
26
|
academia_mcp/tools/web_search.py,sha256=VphVztf2jZNT3bPJPJuTdMkKbe2-LIbSV7keKV47lac,8616
|
27
|
-
academia_mcp/tools/yt_transcript.py,sha256=
|
28
|
-
academia_mcp-1.10.
|
29
|
-
academia_mcp-1.10.
|
30
|
-
academia_mcp-1.10.
|
31
|
-
academia_mcp-1.10.
|
32
|
-
academia_mcp-1.10.
|
33
|
-
academia_mcp-1.10.
|
27
|
+
academia_mcp/tools/yt_transcript.py,sha256=ilfOpX14moC1bKHbFmOVvZ8-_NxuQQUoQbV28e9FBaE,1217
|
28
|
+
academia_mcp-1.10.9.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
29
|
+
academia_mcp-1.10.9.dist-info/METADATA,sha256=GA4c2pahSKkxfT_UUV-DtwFiN7Qu4uR5FgRyW9tcn7o,6356
|
30
|
+
academia_mcp-1.10.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
31
|
+
academia_mcp-1.10.9.dist-info/entry_points.txt,sha256=gxkiKJ74w2FwJpSECpjA3XtCfI5ZfrM6N8cqnwsq4yY,51
|
32
|
+
academia_mcp-1.10.9.dist-info/top_level.txt,sha256=CzGpRFsRRJRqWEb1e3SUlcfGqRzOxevZGaJWrtGF8W0,13
|
33
|
+
academia_mcp-1.10.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|