Update download.py
This commit is contained in:
parent
9780c52f9b
commit
1915e89f57
@ -149,6 +149,7 @@ class dropout():
|
|||||||
|
|
||||||
dl_opts = {
|
dl_opts = {
|
||||||
'progress_hooks': [my_hook],
|
'progress_hooks': [my_hook],
|
||||||
|
'download_archive': '/data/logs/dropout.archive.text',
|
||||||
'format': 'bestvideo+bestaudio/best',
|
'format': 'bestvideo+bestaudio/best',
|
||||||
'audio_quality': '256K',
|
'audio_quality': '256K',
|
||||||
'paths': {
|
'paths': {
|
||||||
@ -212,6 +213,7 @@ class dropout():
|
|||||||
|
|
||||||
dl_opts = {
|
dl_opts = {
|
||||||
'progress_hooks': [my_hook],
|
'progress_hooks': [my_hook],
|
||||||
|
'download_archive': '/data/logs/dropout.archive.text',
|
||||||
'format': 'bestvideo+bestaudio/best',
|
'format': 'bestvideo+bestaudio/best',
|
||||||
'audio_quality': '256K',
|
'audio_quality': '256K',
|
||||||
'paths': {
|
'paths': {
|
||||||
@ -264,7 +266,15 @@ class dropout():
|
|||||||
|
|
||||||
class youtube():
|
class youtube():
|
||||||
def ydl(url, location):
|
def ydl(url, location):
|
||||||
dl_ops = {'progress_hooks': [my_hook],'paths': {'temp': '/temp', 'home': location}, 'outtmpl': '%(uploader)s/%(title)s.%(ext)s'}
|
dl_ops = {
|
||||||
|
'progress_hooks': [my_hook],
|
||||||
|
'download_archive': '/data/logs/youtube.archive.text',
|
||||||
|
'paths': {
|
||||||
|
'temp': '/temp',
|
||||||
|
'home': location
|
||||||
|
},
|
||||||
|
'outtmpl': '%(uploader)s/%(title)s.%(ext)s'
|
||||||
|
}
|
||||||
if dl_ops['paths']['home'] == '/podcasts':
|
if dl_ops['paths']['home'] == '/podcasts':
|
||||||
dl_ops['format'] = 'bestaudio/best[ext=mp3]'
|
dl_ops['format'] = 'bestaudio/best[ext=mp3]'
|
||||||
dl_ops['postprocessors'] = [{
|
dl_ops['postprocessors'] = [{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user