0

How do I add cookies to selenium? The cookies.txt looks something like this:

[{"name":"vssession","value":"asd", "domain":"asdsad.com","path":"/a/ey...","httpOnly":false,"secure":false,"session":true,"expires":1701196238,"sameSite":"unspecified", repeat }]

How do I load these cookies into selenium? I tried using json and pickle but they both gave me the same error:

pickle:

_pickle.UnpicklingError: invalid load key, '['.

JSON:

assert cookie_dict['sameSite'] in ['Strict', 'Lax', 'None']

I tried removing [] but they'd just give me an error for {:

_pickle.UnpicklingError: invalid load key, '{'.

How would I load these cookies into selenium?

er21r21
  • 1
  • 3

0 Answers0