Skip to content

Cookies without an expiration date should also be retained #25

Open
@NabiKAZ

Description

Thanks for your nice project.

I understand that deleting or not saving expired cookies from the file is normal behavior. But sometimes some sites return tokens in the cookie that, despite the expiration of the cookie date and removal from the browser, that token is still valid in subsequent requests and there is no need to request again to get that token. So I don't need that cookie to be deleted.
I have to solve this problem.

// only save cookies that haven't expired
await fs.writeFile(file, JSON.stringify([...this.cookiesValid(false)]));

This code:
this.cookiesValid(false)
to this:
this.cookiesValid(true)
I changed.

It might be a good idea to add a parameter to the main class to select and manage this feature.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions