Selenium-Requests icon indicating copy to clipboard operation
Selenium-Requests copied to clipboard

Lack of ignore cookies option

Open bfsoares opened this issue 9 months ago • 1 comments

Hi! In a particular case of use of Selenium-Requests I realize that is impossible to ignore cookies when making a request, even using the kwarg cookies=[]. Looking in the code I saw that this option is not used as primary option, but only to give extra cookie(s) for those of the session, that are always used. To solve my problem, I created the boolean kwarg "ignore_cookies", including the following code in line 209 of request.py file:

    if kwargs.get("ignore_cookies", False):
        del kwargs["ignore_cookies"]
        del kwargs["cookies"]

To make Selenium-Request more robust and useful to other users, I would like to suggest this change for this module.

bfsoares avatar May 07 '24 18:05 bfsoares