mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-05-21 22:33:23 +02:00
update
This commit is contained in:
parent
c6269646f1
commit
4e2c836602
@ -14,6 +14,8 @@ worker:
|
|||||||
- data:/data
|
- data:/data
|
||||||
environment:
|
environment:
|
||||||
- PASSWORD=secret-passwd
|
- PASSWORD=secret-passwd
|
||||||
|
- FORMAT=worst
|
||||||
|
- OUTTMPL=%(id)s.%(ext)s
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
|
@ -33,7 +33,9 @@ def download(url):
|
|||||||
try:
|
try:
|
||||||
opts = {
|
opts = {
|
||||||
'format': os.getenv('FORMAT', 'best'),
|
'format': os.getenv('FORMAT', 'best'),
|
||||||
|
'outtmpl': os.getenv('OUTTMPL', '%(title)s-%(id)s.%(ext)s'),
|
||||||
'progress_hooks': [hook],
|
'progress_hooks': [hook],
|
||||||
|
'writeinfojson': True,
|
||||||
}
|
}
|
||||||
with youtube_dl.YoutubeDL(opts) as ydl:
|
with youtube_dl.YoutubeDL(opts) as ydl:
|
||||||
ydl.download([url])
|
ydl.download([url])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user