Skip to main content

llama-index readers youtube transcript integration

Project description

Youtube Transcript Loader

pip install llama-hub-youtube-transcript

pip install llama-index-readers-youtube-transcript

This loader fetches the text transcript of Youtube videos using the youtube_transcript_api Python package.

Usage

To use this loader, you will need to first pip install youtube_transcript_api.

Then, simply pass an array of YouTube links into load_data:

from llama_index.readers.youtube_transcript import YoutubeTranscriptReader

loader = YoutubeTranscriptReader()
documents = loader.load_data(
    ytlinks=["https://www.youtube.com/watch?v=i3OYlaoj-BM"]
)

Supported URL formats: + youtube.com/watch?v={video_id} (with or without 'www.') + youtube.com/embed?v={video_id} (with or without 'www.') + youtu.be/{video_id} (never includes www subdomain)

To programmatically check if a URL is supported:

from llama_index.readers.youtube_transcript.utils import is_youtube_video

is_youtube_video("https://youtube.com/watch?v=j83jrh2")  # => True
is_youtube_video("https://vimeo.com/272134160")  # => False

This loader is designed to be used as a way to load data into LlamaIndex.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file llama_index_readers_youtube_transcript-0.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_youtube_transcript-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d18d38f24ce585da31c41c894d71c7137f2de51eb925467d714f9b22b83c6d85
MD5 3e288c13d7904b19b99c1838b3405746
BLAKE2b-256 57f57eb526d9fbe0d3f5b326e15aa285d73e67441e47762c4129854fe509f2ab

See more details on using hashes here.

File details

Details for the file llama_index_readers_youtube_transcript-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_youtube_transcript-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 969a050c68703bd21e16baac70624ca89398ba5913134b9b90122c6eae695615
MD5 a620aa3693b9e0fa72234ea7d511f813
BLAKE2b-256 b0320d92d664da683f41f2a856e7030bd4dba292e311f31bb4d198ece61057a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page