mem0
mem0 copied to clipboard
Change pytube to yt-dlp for youtube loader
🐛 Describe the bug
pytube
has an issue where it will refuse to download a video saying it is age restricted even though it is not https://github.com/pytube/pytube/issues/1712 . yt-dlp does not have that problem and actually returns more data about the video, like most replayed segments. Below code has the link to the video that pytube refused to download
from embedchain import Pipeline as App
import os
os.environ["OPENAI_API_KEY"] = "xxx"
app = App()
app.add('https://www.youtube.com/watch?v=4cUtpiDwU0s', data_type='youtube_video')
app.query("What is the video about?")
Even this Langchain tutorial uses yt-dlp .
It is an easy fix and would require change in this file https://github.com/langchain-ai/langchain/blob/c2d1d903fa35b91018b4d777db2b008fcbaa9fbc/langchain/document_loaders/youtube.py#L59C18-L59C24 .
Let me know and I can make PR.
Hey, thanks for opening the issue. Definitely in support of this.
Please feel free to open a PR. Thanks!
Hey @KobaKhit any updates on this? Would be great to migrate to yt_dlp soon. Thanks!
Hey @KobaKhit any updates on this? Would be great to migrate to yt_dlp soon. Thanks!
@deshraj @Dev-Khant I have resolved this issue and created a pull request by the name fix/migrate-pytube-to-ytdlp but its been 11 hours and CI has not completed any build checks. Is there anything wrong I am doing or is there some sort of queue?
Hey @KobaKhit any updates on this? Would be great to migrate to yt_dlp soon. Thanks!
@deshraj @Dev-Khant I have resolved this issue and created a pull request by the name fix/migrate-pytube-to-ytdlp but its been 11 hours and CI has not completed any build checks. Is there anything wrong I am doing or is there some sort of queue?
Hi @MoizKhuzema thanks for working on this issue, will review the PR and CI build checks were yet to be started.
Hey @KobaKhit any updates on this? Would be great to migrate to yt_dlp soon. Thanks!
@deshraj @Dev-Khant I have resolved this issue and created a pull request by the name fix/migrate-pytube-to-ytdlp but its been 11 hours and CI has not completed any build checks. Is there anything wrong I am doing or is there some sort of queue?
Hi @MoizKhuzema thanks for working on this issue, will review the PR and CI build checks were yet to be started.
Noted