Skip to content

Commit e111e7d

Browse files
fix: nonsense to install yt dlp and parse youtube in peace
Signed-off-by: thiswillbeyourgithub <[email protected]>
1 parent f930af0 commit e111e7d

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def run(self):
119119
'goose3 >= 3.1.19', # url
120120
"youtube_dl", # youtube_dl, we try to install yt_dl_patched using PostInstallCommand as it's not in pypi but we install yt_dl anyway just in case. Also the latest version will try to be installed from the git repo directly using the PostInstallCommand function above.
121121
"youtube-transcript-api >= 0.6.2", # youtube
122-
"pytube >= 15.0.0", # youtube
122+
# "pytube >= 15.0.0", # youtube
123+
"yt-dlp >= 2024.10.23.232902.dev0", # youtube
123124
'LogseqMarkdownParser >= 3.3', # logseq files (I'm the dev behind it)
124125
'deepgram-sdk >= 3.2.7', # audio transcription
125126
'httpx >= 0.27.0', # to increase deepgram timeout

wdoc/utils/import_tricks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def custom_loading(module: str, strict: bool = True) -> None:
8181
custom_loading('sqlite3')
8282
custom_loading('tldextract')
8383
custom_loading('pyfiglet')
84-
custom_loading('youtube_dl')
8584
custom_loading('yt_dlp', strict=False)
8685
custom_loading('pandas')
8786
custom_loading('ankipandas')

wdoc/utils/loaders.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import playwright.sync_api
6060
import openparse
6161
from langchain.text_splitter import TextSplitter, RecursiveCharacterTextSplitter
62+
import yt_dlp as youtube_dl
6263

6364
from .misc import (doc_loaders_cache, html_to_text, hasher,
6465
file_hasher, get_splitter, check_docs_tkn_length,
@@ -72,15 +73,6 @@
7273
from .errors import TimeoutPdfLoaderError
7374
from .env import WDOC_MAX_PDF_LOADER_TIMEOUT, WDOC_EMPTY_LOADER, WDOC_PRIVATE_MODE
7475

75-
# try:
76-
# import yt_dlp as youtube_dl
77-
# except ImportError as e :
78-
# red("Failed to import yt_dlp, a better fork of youtube_dl.\n"
79-
# "Consider installing it from pip with pip install git+https://github.com/ytdl-patched/ytdl-patched\n"
80-
# "Will fallback to using youtube_dl")
81-
# import youtube_dl
82-
import youtube_dl
83-
8476
try:
8577
import pdftotext
8678
except Exception as err:

0 commit comments

Comments
 (0)