From 07e96f122d7503cb160685f65af84720fa67d79b Mon Sep 17 00:00:00 2001 From: Loibl33 <76207404+Loibl33@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:00:34 +0100 Subject: [PATCH 1/3] Fixed Latin-1 decode problems Fixes Latin-1 decode problems --- installer/client/cli/yt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/client/cli/yt.py b/installer/client/cli/yt.py index b0449a0..cd5585b 100644 --- a/installer/client/cli/yt.py +++ b/installer/client/cli/yt.py @@ -103,7 +103,7 @@ def main_function(url, options): if options.duration: print(duration_minutes) elif options.transcript: - print(transcript_text) + print(transcript_text.encode('utf-8').decode('unicode-escape')) elif options.comments: print(json.dumps(comments, indent=2)) else: From 4d48f299eeab32d57a3fa26aaefb211b6cfed3c9 Mon Sep 17 00:00:00 2001 From: Bartosz Pokrywka Date: Wed, 27 Mar 2024 13:20:11 +0100 Subject: [PATCH 2/3] modified: installer/client/cli/yt.py --- installer/client/cli/yt.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/installer/client/cli/yt.py b/installer/client/cli/yt.py index b0449a0..0fff358 100644 --- a/installer/client/cli/yt.py +++ b/installer/client/cli/yt.py @@ -88,11 +88,11 @@ def main_function(url, options): # Get video transcript try: - transcript_list = YouTubeTranscriptApi.get_transcript(video_id) + transcript_list = YouTubeTranscriptApi.get_transcript(video_id, languages=[options.lang]) transcript_text = " ".join([item["text"] for item in transcript_list]) transcript_text = transcript_text.replace("\n", " ") except Exception as e: - transcript_text = f"Transcript not available. ({e})" + transcript_text = f"Transcript not available in the selected language ({options.lang}). ({e})" # Get comments if the flag is set comments = [] @@ -126,7 +126,8 @@ def main(): parser.add_argument('--duration', action='store_true', help='Output only the duration') parser.add_argument('--transcript', action='store_true', help='Output only the transcript') parser.add_argument('--comments', action='store_true', help='Output the comments on the video') - + parser.add_argument('--lang', default='en', help='Language for the transcript (default: English)') + args = parser.parse_args() if args.url is None: From d42a310ec8a68bc029343364c6cc6bfc3d72e51a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 18:00:53 +0000 Subject: [PATCH 3/3] Bump langchain-core from 0.1.31 to 0.1.35 Bumps [langchain-core](https://github.com/langchain-ai/langchain) from 0.1.31 to 0.1.35. - [Release notes](https://github.com/langchain-ai/langchain/releases) - [Commits](https://github.com/langchain-ai/langchain/commits) --- updated-dependencies: - dependency-name: langchain-core dependency-type: indirect ... Signed-off-by: dependabot[bot] --- poetry.lock | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0c0c83b..7bfee8b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1470,17 +1470,16 @@ extended-testing = ["aiosqlite (>=0.19.0,<0.20.0)", "aleph-alpha-client (>=2.15. [[package]] name = "langchain-core" -version = "0.1.31" +version = "0.1.35" description = "Building applications with LLMs through composability" optional = false -python-versions = ">=3.8.1,<4.0" +python-versions = "<4.0,>=3.8.1" files = [ - {file = "langchain_core-0.1.31-py3-none-any.whl", hash = "sha256:ff028f00db8ff03565b542cea81be27426022a72c6545b54d8de66fa00948ab3"}, - {file = "langchain_core-0.1.31.tar.gz", hash = "sha256:d660cf209bb6ce61cb1c853107b091aaa809015a55dce9e0ce19b51d4c8f2a70"}, + {file = "langchain_core-0.1.35-py3-none-any.whl", hash = "sha256:9d790446ea211f4cb620886081cc5a5723bc9a2dc90af1f6205aded2ee61bb71"}, + {file = "langchain_core-0.1.35.tar.gz", hash = "sha256:862b8415d4deaf4e06833ef826bcef3614d75c3e7fd82b09b1349cc223f02e9a"}, ] [package.dependencies] -anyio = ">=3,<5" jsonpatch = ">=1.33,<2.0" langsmith = ">=0.1.0,<0.2.0" packaging = ">=23.2,<24.0" @@ -3684,4 +3683,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "5732b76a0ab3501228efa6c0091e4a66bd84def76c8934f06b9219dc2c9d3ad3" +content-hash = "0cb2d2f8fc9cdfa79f9406a835251676f39db15de63b1ba1ef8f0fed71307f2b"