move while up
This commit is contained in:
parent
382fc137a1
commit
fccb5ec955
1 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue