from selenium import webdriver
import json
browser = webdriver.Chrome()
url = 'https://www.google.com/'
browser.get(url)
cookie = browser.get_cookies()
browser.quit()
with open('cookie', 'w') as j_out:
json.dump(cookie, j_out)
with open('cookie') as j:
saved_cookie = json.load(j)
#print(saved_cookie) # The whole cookie as a list with dictionaries
print(saved_cookie[0]['domain'])
print(saved_cookie[0]['httpOnly'])