Copy code
from selenium import webdriver
driver = webdriver.Chrome()
# Go to medium.com
driver.get("https://medium.com")
# Delete all cookies
driver.delete_all_cookies()
# Confirm that the cookies have been deleted
cookies = driver.get_cookies()
print(cookies) # should return an empty list
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter