1

I want to use the cookie taken from the request header to log into the account of a web site opened with selenium python my problem is that i don't want to add cookies one by one

For example

this is form my code:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import pickle
import time
import os
import requests

cookie = ("input cookie from request header: ")

# convert to selenium cookie

driver = webdriver.Chrome(options=options)
driver.get('https://www.example.com/')

# add the newly converted cookie

driver.refresh()
Shy Hazard
  • 11
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 27 '23 at 21:41

0 Answers0