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