Youtube Transcript Loader
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_hub.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_hub.youtube_transcript 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 and/or subsequently used as a Tool in a LangChain Agent. See here for examples.
Metadata
Release files for flying-delta-readers-youtube-transcript 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flying_delta_readers_youtube_transcript-0.1.0.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flying_delta_readers_youtube_transcript-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.8 kB
Release files / flying_delta_readers_youtube_transcript-0.1.0.tar.gz
| Download URL | flying_delta_readers_youtube_transcript-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4a6c6bbc7a1b34dfb3dd7d5f756ea204ab018c38c24aee8e98146c377b6abf0
|
|
BLAKE2b-256 checksum How to use checksums |
c6862412904a963e85f418697cc2c74057da3794ce7cc1c5672add0335be8699
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.13 Darwin/23.0.0
|
Release files / flying_delta_readers_youtube_transcript-0.1.0-py3-none-any.whl
| Download URL | flying_delta_readers_youtube_transcript-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4b591ea97a558ce07769ef49f33d7fd476d9ec3c4b3f354527511b3f7eb7b455
|
|
BLAKE2b-256 checksum How to use checksums |
a6acfdfe4362ad705838b3f5f7a5df51cbcd9ffa6de56af996e439e2ca31f512
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.13 Darwin/23.0.0
|