move while up

This commit is contained in:
Antonio J. Delgado 2025-08-10 12:17:05 +03:00
parent 382fc137a1
commit fccb5ec955

View file

@ -377,12 +377,12 @@ class GetYoutubeVideos:
} }
if self.selected_proxy != '': if self.selected_proxy != '':
ydl_opts['proxy'] = self.selected_proxy ydl_opts['proxy'] = self.selected_proxy
with yt_dlp.YoutubeDL(ydl_opts) as ydl: download_result = 'starting'
download_result = 'starting' while 'downloaded' not in download_result and 'error' not in download_result:
while 'downloaded' not in download_result and 'error' not in download_result: self._log.debug(
self._log.debug( f"Download status: {download_result}"
f"Download status: {download_result}" )
) with yt_dlp.YoutubeDL(ydl_opts) as ydl:
try: try:
uri=f"https://www.youtube.com/watch?v={video_id}" uri=f"https://www.youtube.com/watch?v={video_id}"
return_code = ydl.download(uri) return_code = ydl.download(uri)