Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
OurBuilding Ambient Agents with LangGraph course is now available on LangChain Academy!
Open In ColabOpen on GitHub

YouTube

YouTube Search package searchesYouTube videos avoiding using their heavily rate-limited API.

It uses the form on theYouTube homepage and scrapes the resulting page.

This notebook shows how to use a tool to search YouTube.

Adapted fromhttps://github.com/venuv/langchain_yt_tools

%pip install--upgrade--quiet  youtube_search
from langchain_community.toolsimport YouTubeSearchTool
API Reference:YouTubeSearchTool
tool= YouTubeSearchTool()
tool.run("lex fridman")
"['/watch?v=VcVfceTsD0A&pp=ygUMbGV4IGZyaWVkbWFu', '/watch?v=gPfriiHBBek&pp=ygUMbGV4IGZyaWVkbWFu']"

You can also specify the number of results that are returned

tool.run("lex friedman,5")
"['/watch?v=VcVfceTsD0A&pp=ygUMbGV4IGZyaWVkbWFu', '/watch?v=YVJ8gTnDC4Y&pp=ygUMbGV4IGZyaWVkbWFu', '/watch?v=Udh22kuLebg&pp=ygUMbGV4IGZyaWVkbWFu', '/watch?v=gPfriiHBBek&pp=ygUMbGV4IGZyaWVkbWFu', '/watch?v=L_Guz73e6fw&pp=ygUMbGV4IGZyaWVkbWFu']"

Related


[8]ページ先頭

©2009-2025 Movatter.jp