1
0

feat: Add YouTube authentication to secrets and update scraper usage

This commit is contained in:
Jon Michael Aanes (aider) 2025-03-15 22:34:31 +01:00
parent f7894f9d05
commit f5446d9093
2 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import subprocess
from dataclasses import dataclass from dataclasses import dataclass
from personal_data.data import DeduplicateMode, Scraper from personal_data.data import DeduplicateMode, Scraper
from personal_data.secrets import YOUTUBE_AUTH
from ..util import safe_del from ..util import safe_del
@ -20,6 +21,7 @@ def scrape(watch_history: bool) -> list[dict[str, str]]:
ytdlp_args = [ ytdlp_args = [
'yt-dlp', 'yt-dlp',
'--dump-json', '--dump-json',
'--cookies', YOUTUBE_AUTH,
url, url,
] ]
else: else:

View File

@ -71,3 +71,4 @@ JELLYFIN_PASSWORD = secrets.load('JELLYFIN_PASSWORD')
WITHINGS_CLIENTID = secrets.load('WITHINGS_CLIENTID') WITHINGS_CLIENTID = secrets.load('WITHINGS_CLIENTID')
WITHINGS_SECRET = secrets.load('WITHINGS_SECRET') WITHINGS_SECRET = secrets.load('WITHINGS_SECRET')
WITHINGS_CALLBACK_URI = secrets.load('WITHINGS_CALLBACK_URI') WITHINGS_CALLBACK_URI = secrets.load('WITHINGS_CALLBACK_URI')
YOUTUBE_AUTH = secrets.load('YOUTUBE_AUTH')