home
·
contact
·
privacy
projects
/
ytplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b029a5a
)
Limit download video resolution to max. full HD.
master
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 5 Nov 2024 03:40:59 +0000
(
04:40
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 5 Nov 2024 03:40:59 +0000
(
04:40
+0100)
ytplom.py
patch
|
blob
|
history
diff --git
a/ytplom.py
b/ytplom.py
index 1dbd147ab6fdfefc8eb8379eda5cd3d8e1716dba..370f504483ede58e3eec7f65f5b547e3b82c20cb 100755
(executable)
--- a/
ytplom.py
+++ b/
ytplom.py
@@
-103,7
+103,10
@@
def download_thread():
except IndexError:
continue
url = f'{YOUTUBE_URL_PREFIX}{video_id}'
except IndexError:
continue
url = f'{YOUTUBE_URL_PREFIX}{video_id}'
- params = {'paths': {'home': PATH_DIR_DOWNLOADS, 'temp': NAME_DIR_TEMP}}
+ fmt = 'bestvideo[height<=1080][width<=1920]+bestaudio'\
+ '/best[height<=1080][width<=1920]'
+ params = {'paths': {'home': PATH_DIR_DOWNLOADS, 'temp': NAME_DIR_TEMP},
+ 'format': fmt}
with YoutubeDL(params) as ydl:
ydl.download([url])
with YoutubeDL(params) as ydl:
ydl.download([url])