mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 03:10:38 +00:00
parent
8993721ecb
commit
dbd8b1bff9
@ -962,6 +962,7 @@ class YoutubeDL:
|
||||
|
||||
def close(self):
|
||||
self.save_cookies()
|
||||
if '_request_director' in self.__dict__:
|
||||
self._request_director.close()
|
||||
del self._request_director
|
||||
|
||||
|
@ -68,7 +68,7 @@ class RequestDirector:
|
||||
def close(self):
|
||||
for handler in self.handlers.values():
|
||||
handler.close()
|
||||
self.handlers = {}
|
||||
self.handlers.clear()
|
||||
|
||||
def add_handler(self, handler: RequestHandler):
|
||||
"""Add a handler. If a handler of the same RH_KEY exists, it will overwrite it"""
|
||||
|
Loading…
Reference in New Issue
Block a user