Skip to content

Commit 6814f7a

Browse files
Update ytdl.py
1 parent a9c4c24 commit 6814f7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dl/ytdl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from urllib.parse import parse_qs, urlparse
1414

1515
from yt_dlp import YoutubeDL
16-
from yt_dlp.utils import DownloadError, ExtractorError, UnavailableVideoError
16+
from yt_dlp.utils import DownloadError, ExtractorError
1717

1818
from utils.misc import modules_help, prefix
1919
from utils.scripts import format_exc, progress, resize_image
@@ -99,7 +99,7 @@ def download_video(url):
9999
file_path = f"downloads/ytdl/videos/{i_d}.{ext}"
100100
ydl.download([url])
101101
return file_path, title, img, thumb_url
102-
except (DownloadError, ExtractorError, UnavailableVideoError):
102+
except (DownloadError, ExtractorError):
103103
video_id = extract_video_id(url)
104104
is_videoId = True if video_id is not None else False
105105
video_id = url if video_id is None else video_id
@@ -139,7 +139,7 @@ def download_music(url):
139139
else:
140140
raise FileNotFoundError("Downloaded file not found in audios folder")
141141
return file_path, title, img
142-
except (DownloadError, ExtractorError, UnavailableVideoError):
142+
except (DownloadError, ExtractorError):
143143
video_id = extract_video_id(url)
144144
is_videoId = True if video_id is not None else False
145145
video_id = url if video_id is None else video_id

0 commit comments

Comments
 (0)