mirror of
https://github.com/tubearchivist/tubearchivist
synced 2024-11-02 09:41:07 +00:00
add cookiefile to yt_obs in YouTubeItem baseclass
This commit is contained in:
parent
4e3d71e0e3
commit
6cc5fd8890
@ -6,6 +6,7 @@ functionality:
|
|||||||
import math
|
import math
|
||||||
|
|
||||||
import yt_dlp
|
import yt_dlp
|
||||||
|
from home.src.download.yt_cookie import CookieHandler
|
||||||
from home.src.es.connect import ElasticWrap
|
from home.src.es.connect import ElasticWrap
|
||||||
from home.src.ta.config import AppConfig
|
from home.src.ta.config import AppConfig
|
||||||
from home.src.ta.ta_redis import RedisArchivist
|
from home.src.ta.ta_redis import RedisArchivist
|
||||||
@ -37,6 +38,9 @@ class YouTubeItem:
|
|||||||
"""read user conf"""
|
"""read user conf"""
|
||||||
self.config = AppConfig().config
|
self.config = AppConfig().config
|
||||||
self.app_conf = self.config["application"]
|
self.app_conf = self.config["application"]
|
||||||
|
if self.config["downloads"]["cookie_import"]:
|
||||||
|
cookie_path = CookieHandler().use()
|
||||||
|
self.yt_obs.update({"cookiefile": cookie_path})
|
||||||
|
|
||||||
def get_from_youtube(self):
|
def get_from_youtube(self):
|
||||||
"""use yt-dlp to get meta data from youtube"""
|
"""use yt-dlp to get meta data from youtube"""
|
||||||
|
Loading…
Reference in New Issue
Block a user