Skip to content

Commit 450a4b1

Browse files
committed
Add command line option to set cookie file
1 parent b48c134 commit 450a4b1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/pycookiecheat/__main__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ def main() -> None:
3434
"`logging.ERROR`"
3535
),
3636
)
37+
parser.add_argument(
38+
"-c",
39+
"--cookie-file",
40+
help="Cookie file",
41+
)
3742
args = parser.parse_args()
3843

3944
logging.basicConfig(level=max(logging.ERROR - 10 * args.verbose, 0))
@@ -48,12 +53,14 @@ def main() -> None:
4853
url=args.url,
4954
browser=browser,
5055
curl_cookie_file=args.output_file,
56+
cookie_file=args.cookie_file,
5157
)
5258
else:
5359
cookies = chrome_cookies(
5460
url=args.url,
5561
browser=browser,
5662
curl_cookie_file=args.output_file,
63+
cookie_file=args.cookie_file,
5764
)
5865

5966
if not args.output_file:

0 commit comments

Comments
 (0)