mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
Update youtube.py
This commit is contained in:
parent
1a30b3746e
commit
b0d74a59f1
1 changed files with 2 additions and 3 deletions
|
|
@ -118,8 +118,7 @@ class YoutubeLoader:
|
|||
log.debug(f"No transcript found for language '{lang}'")
|
||||
continue
|
||||
except Exception as e:
|
||||
# If we hit any other type of exception, log it and re-raise
|
||||
log.exception(f"Error finding transcript for language '{lang}'")
|
||||
log.warning(f"Error finding transcript for language '{lang}'")
|
||||
raise e
|
||||
|
||||
# If all specified languages fail, fall back to English (unless English was already tried)
|
||||
|
|
@ -141,7 +140,7 @@ class YoutubeLoader:
|
|||
log.exception("Error finding English transcript fallback")
|
||||
raise e
|
||||
|
||||
# If we get here, all languages failed including the English fallback
|
||||
# All languages failed
|
||||
languages_tried = ", ".join(self.language)
|
||||
if "en" not in self.language:
|
||||
languages_tried += ", en (fallback)"
|
||||
|
|
|
|||
Loading…
Reference in a new issue