mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 05:08:28 +03:00
Merge remote-tracking branch 'origin/feat/yt-dlp-pots' into feat/yt-dlp-pots
This commit is contained in:
@@ -307,6 +307,22 @@ class GenericExtractor(Extractor):
|
||||
ydl_options['cookiefile'] = auth['cookies_file']
|
||||
|
||||
|
||||
# Applying user-defined extractor_args
|
||||
if self.extractor_args:
|
||||
logger.info(f"Applying user-defined extractor_args")
|
||||
ydl_options.setdefault('extractor_args', {})
|
||||
|
||||
for key, args in self.extractor_args.items():
|
||||
logger.debug(f"Setting extractor_args: {key}")
|
||||
if isinstance(args, dict):
|
||||
# Site specific arguments (e.g., youtube: somekey=value)
|
||||
ydl_options['extractor_args'].setdefault(key, {}).update(args)
|
||||
else:
|
||||
# General extractor_args (e.g., somekey=value)
|
||||
ydl_options['extractor_args'][key] = args
|
||||
|
||||
|
||||
|
||||
# Applying user-defined extractor_args
|
||||
if self.extractor_args:
|
||||
logger.info(f"Applying user-defined extractor_args")
|
||||
|
||||
Reference in New Issue
Block a user