Skip to content

Commit 5a3f54d

Browse files
Copilothlohaus
andcommitted
fix: resolve TypeError when using --cookie-browsers CLI argument
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
1 parent 4b5f53d commit 5a3f54d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

g4f/cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def run_api_args(args):
221221

222222
# Custom cookie browsers
223223
if args.cookie_browsers:
224-
cookies.BROWSERS = [cookies[b] for b in args.cookie_browsers]
224+
cookies.BROWSERS = [b for b in cookies.BROWSERS if b.__name__ in args.cookie_browsers]
225225

226226
# Allow overriding the cookies directory from CLI
227227
if getattr(args, "cookies_dir", None):

0 commit comments

Comments
 (0)