download API의 headers 키 제거
This commit is contained in:
@@ -45,7 +45,7 @@ class MyYoutubeDL(object):
|
||||
__index = 0
|
||||
_last_msg = ''
|
||||
|
||||
def __init__(self, plugin, url, filename, temp_path, save_path=None, opts=None, dateafter=None, datebefore=None, headers={}):
|
||||
def __init__(self, plugin, url, filename, temp_path, save_path=None, opts=None, dateafter=None, datebefore=None):
|
||||
# from youtube_dl.utils import DateRange
|
||||
from .plugin import YOUTUBE_DL_PACKAGE
|
||||
DateRange = __import__('%s.utils' % YOUTUBE_DL_PACKAGE, fromlist=['DateRange']).DateRange
|
||||
@@ -66,7 +66,6 @@ class MyYoutubeDL(object):
|
||||
self.opts = opts
|
||||
if dateafter or datebefore:
|
||||
self.opts['daterange'] = DateRange(start=dateafter, end=datebefore)
|
||||
self.headers = headers
|
||||
self.index = MyYoutubeDL.__index
|
||||
MyYoutubeDL.__index += 1
|
||||
self.__status = Status.READY
|
||||
@@ -110,8 +109,6 @@ class MyYoutubeDL(object):
|
||||
try:
|
||||
self.start_time = datetime.now()
|
||||
self.status = Status.START
|
||||
# headers는 전역으로 계속 사용하기 때문에 매번 세팅
|
||||
youtube_dl.utils.std_headers = self.headers
|
||||
# 동영상 정보 가져오기
|
||||
info_dict = MyYoutubeDL.get_info_dict(self.url, self.opts.get('proxy'), self.opts.get('cookiefile'))
|
||||
if info_dict is None:
|
||||
|
||||
Reference in New Issue
Block a user