Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to persist cookies #1720

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dosy4ev
Copy link

@dosy4ev dosy4ev commented Aug 20, 2023

  • Change auth param from tuple to dict to support optional cookie_jar param.
  • Add option to provide callable for lazy password fetching.

* Change `auth` param from tuple to dict to support optional
  `cookie_jar` param.
* Add option to provide callable for lazy password fetching.
@dosy4ev
Copy link
Author

dosy4ev commented Aug 20, 2023

fixes #883

Comment on lines -471 to +498
auth (Optional[Tuple[str,str]]): Set a cookie auth token if this is required.

auth (Optional[Dict[str, Any]]): A dict of properties for Cookei authentication.
The following properties are available:

* username (srt) -- username
* password (str | Callable[[], str]) -- password or function for lazy receiving password
* cookie_jar (Optional[srt]) -- file path for persisting cookies

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if we can support both tuple and dict, with a deprecation warning for the tuple. As we need to consider all users

Copy link
Collaborator

@adehad adehad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(as mentioned please look into supporting existing use case too)

@adehad adehad marked this pull request as draft December 21, 2023 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants