I want to reuse a whatsapp web session via Python 3 and Selenium on Chromedriver.
For which I need to grab the localstorage of an existing session and set it to the new
this is how you can reuse a whatsapp web session by storing cookies.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--user-data-dir=chrome-data")
driver = webdriver.Chrome('chromedriver.exe',options=chrome_options)
driver.get('https://web.whatsapp.com')
time.sleep(30)