download API에 cookiefile, headers 키 추가

download API에 cookiefile, headers 키 추가 (Thanks to soju6jan)
This commit is contained in:
joyfuI
2020-12-07 23:59:36 +09:00
parent 33bfe6f4ee
commit 04937f7c64
5 changed files with 25 additions and 27 deletions

View File

@@ -110,10 +110,11 @@ class LogicNormal(object):
opts['proxy'] = kwagrs['proxy']
if 'ffmpeg_path' in kwagrs and kwagrs['ffmpeg_path']:
opts['ffmpeg_location'] = kwagrs['ffmpeg_path']
if 'cookiefile' in kwagrs and kwagrs['cookiefile']:
opts['cookiefile'] = kwagrs['cookiefile']
dateafter = kwagrs.get('dateafter')
# 2020-12-06 by soju6jan. api로 headers, cookiefile 전달
youtube_dl = MyYoutubeDL(plugin, url, filename, temp_path, save_path, opts, dateafter, headers=kwagrs['headers'], cookiefile=kwagrs['cookiefile'])
# by soju6jan
headers = kwagrs.get('headers')
youtube_dl = MyYoutubeDL(plugin, url, filename, temp_path, save_path, opts, dateafter, headers)
youtube_dl.key = kwagrs.get('key')
LogicNormal.youtube_dl_list.append(youtube_dl) # 리스트 추가
return youtube_dl