Skip to main content
yt-dlp 라이브러리를 활용하는 Youtube용 로더입니다. 이 패키지는 Youtube용 문서 로더를 구현합니다. pytube에 의존하는 langchain-communityYoutubeLoader와 달리, YoutubeLoaderDL은 YouTube 메타데이터를 가져올 수 있습니다. langchain-yt-dlp는 강력한 yt-dlp 라이브러리를 활용하여 보다 안정적이고 기능이 풍부한 YouTube 문서 로더를 제공합니다.

개요

통합 세부 정보

클래스패키지로컬직렬화 가능JS 지원
YoutubeLoaderlangchain-yt-dlp

설정

설치

pip install langchain-yt-dlp

초기화

from langchain_yt_dlp.youtube_loader import YoutubeLoaderDL

# 기본 트랜스크립트 로딩
loader = YoutubeLoaderDL.from_youtube_url(
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ", add_video_info=True
)

로드

documents = loader.load()
documents[0].metadata
{'source': 'dQw4w9WgXcQ',
 'title': 'Rick Astley - Never Gonna Give You Up (Official Music Video)',
 'description': 'The official video for "Never Gonna Give You Up" by Rick Astley. \n\nNever: The Autobiography 📚 OUT NOW! \nFollow this link to get your copy and listen to Rick's 'Never' playlist ❤️ #RickAstleyNever\nhttps://linktr.ee/rickastleynever\n\n"Never Gonna Give You Up" was a global smash on its release in July 1987, topping the charts in 25 countries including Rick's native UK and the US Billboard Hot 100.  It also won the Brit Award for Best single in 1988. Stock Aitken and Waterman wrote and produced the track which was the lead-off single and lead track from Rick's debut LP "Whenever You Need Somebody".  The album was itself a UK number one and would go on to sell over 15 million copies worldwide.\n\nThe legendary video was directed by Simon West – who later went on to make Hollywood blockbusters such as Con Air, Lara Croft – Tomb Raider and The Expendables 2.  The video passed the 1bn YouTube views milestone on 28 July 2021.\n\nSubscribe to the official Rick Astley YouTube channel: https://RickAstley.lnk.to/YTSubID\n\nFollow Rick Astley:\nFacebook: https://RickAstley.lnk.to/FBFollowID \nTwitter: https://RickAstley.lnk.to/TwitterID \nInstagram: https://RickAstley.lnk.to/InstagramID \nWebsite: https://RickAstley.lnk.to/storeID \nTikTok: https://RickAstley.lnk.to/TikTokID\n\nListen to Rick Astley:\nSpotify: https://RickAstley.lnk.to/SpotifyID \nApple Music: https://RickAstley.lnk.to/AppleMusicID \nAmazon Music: https://RickAstley.lnk.to/AmazonMusicID \nDeezer: https://RickAstley.lnk.to/DeezerID \n\nLyrics:\nWe're no strangers to love\nYou know the rules and so do I\nA full commitment's what I'm thinking of\nYou wouldn't get this from any other guy\n\nI just wanna tell you how I'm feeling\nGotta make you understand\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\nWe've known each other for so long\nYour heart's been aching but you're too shy to say it\nInside we both know what's been going on\nWe know the game and we're gonna play it\n\nAnd if you ask me how I'm feeling\nDon't tell me you're too blind to see\n\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\n#RickAstley #NeverGonnaGiveYouUp #WheneverYouNeedSomebody #OfficialMusicVideo',
 'view_count': 1603360806,
 'publish_date': datetime.datetime(2009, 10, 25, 0, 0),
 'length': 212,
 'author': 'Rick Astley',
 'channel_id': 'UCuAXFkgsw1L7xaCfnd5JJOw',
 'webpage_url': 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'}

지연 로드

  • 지연 로딩이 구현되어 있지 않습니다

API 레퍼런스


Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I