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.3.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_youtube_transcript-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2259dc60253bef07d9a39f57665f71bc09011c9ca9774a6c5331185bd8fdff08
MD5 9a0fed514225af200a248b6f35f44739
BLAKE2b-256 f8f1021d085dd5f72f0e8e2da459fe9942cf8338331691583dbc500f29416aa0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_readers_youtube_transcript-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08aa86ed287b1f7de60bbb9e7d6e6e4ed0873b85c9a32b2af00350b900bc40c3
MD5 177157b78272ee7fe504f32312a29b7b
BLAKE2b-256 aea976ba4d311212950d8acad4fb0a490d6e98e91ff7622b720b54891420f013

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