f
This commit is contained in:
@@ -166,6 +166,10 @@ def list_formats(
|
||||
|
||||
if cookiefile:
|
||||
ydl_opts["cookiefile"] = str(cookiefile)
|
||||
else:
|
||||
# Best effort attempt to use browser cookies if no file is explicitly passed
|
||||
ydl_opts["cookiesfrombrowser"] = "chrome"
|
||||
|
||||
if no_playlist:
|
||||
ydl_opts["noplaylist"] = True
|
||||
if playlist_items:
|
||||
@@ -558,6 +562,11 @@ class YtDlpTool:
|
||||
cookiefile = self.resolve_cookiefile()
|
||||
if cookiefile is not None and cookiefile.is_file():
|
||||
base_options["cookiefile"] = str(cookiefile)
|
||||
else:
|
||||
# Add browser cookies support "just in case" if no file found (best effort)
|
||||
# This uses yt-dlp's support for extracting from common browsers.
|
||||
# Defaulting to 'chrome' as the most common path.
|
||||
base_options["cookiesfrombrowser"] = "chrome"
|
||||
|
||||
if opts.no_playlist:
|
||||
base_options["noplaylist"] = True
|
||||
|
||||
Reference in New Issue
Block a user