Harrison/youtube multi language (#5758)

Co-authored-by: rafly lesmana <raflylesmana111@gmail.com>
This commit is contained in:
Harrison Chase
2023-06-05 16:38:07 -07:00
committed by GitHub
parent 2dcda8a8ac
commit 25487fa5ee
2 changed files with 31 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "df770c72",
"metadata": {},
@@ -55,11 +56,12 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "6b278a1b",
"metadata": {},
"source": [
"## Add video info"
"### Add video info"
]
},
{
@@ -79,20 +81,36 @@
"metadata": {},
"outputs": [],
"source": [
"loader = YoutubeLoader.from_youtube_url(\"https://www.youtube.com/watch?v=QsYGlZkevEg\", add_video_info=True)"
"loader = YoutubeLoader.from_youtube_url(\"https://www.youtube.com/watch?v=QsYGlZkevEg\", add_video_info=True)\n",
"loader.load()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "fc417e31",
"metadata": {},
"source": [
"### Add language preferences\n",
"\n",
"Language param : It's a list of language codes in a descending priority, `en` by default.\n",
"\n",
"translation param : It's a translate preference when the youtube does'nt have your select language, `en` by default."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "97b98e92",
"id": "08510625",
"metadata": {},
"outputs": [],
"source": [
"loader = YoutubeLoader.from_youtube_url(\"https://www.youtube.com/watch?v=QsYGlZkevEg\", add_video_info=True, language=['en','id'], translation='en')\n",
"loader.load()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "65796cc5",
"metadata": {},