Created
June 12, 2019 11:54
-
-
Save billju/7616727b199dcf1e9edbae3b84d4359b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
driver = webdriver.Chrome('C:/Users/使用者名稱/Downloads/chromedriver.exe') | |
driver.get('https://shopee.tw/') #會彈出新的頁面 | |
cookies = driver.get_cookies() #格式為list包dict | |
csrftoken = [item['value'] for item in cookies if item['name'] == 'csrftoken'][0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment