mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-19 16:39:14 +08:00
Update youtube.py
This commit is contained in:
parent
c69278c13c
commit
f65dc715f9
@ -105,7 +105,7 @@ class YoutubeLoader:
|
|||||||
# Make a copy of the language list to avoid modifying the original
|
# Make a copy of the language list to avoid modifying the original
|
||||||
languages_to_try = list(self.language)
|
languages_to_try = list(self.language)
|
||||||
|
|
||||||
# Add English as fallback, if not already in the list
|
# Add English as fallback if not already in the list
|
||||||
if "en" not in languages_to_try:
|
if "en" not in languages_to_try:
|
||||||
log.debug("Adding English as fallback language")
|
log.debug("Adding English as fallback language")
|
||||||
languages_to_try.append("en")
|
languages_to_try.append("en")
|
||||||
@ -132,5 +132,5 @@ class YoutubeLoader:
|
|||||||
|
|
||||||
# If we get here, all languages failed
|
# If we get here, all languages failed
|
||||||
languages_tried = ", ".join(languages_to_try)
|
languages_tried = ", ".join(languages_to_try)
|
||||||
log.warning(f"No transcript found for any of the specified languages: {languages_tried}")
|
log.warning(f"No transcript found for any of the specified languages: {languages_tried}. Verify if the video has transcripts, add more languages if needed.")
|
||||||
raise NoTranscriptFound(f"No transcript found for any supported language. Add additional supported languages and verify whether the video has any transcripts.")
|
raise NoTranscriptFound(f"No transcript found for any supported language. Verify if the video has transcripts, add more languages if needed.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user