python爬虫获取localStorage中的数据(获取token)

# 此为获取东航登录时的token(经分析js得出此token存储于localstorage中)

 

 

browser = webdriver.Chrome(executable_path='xxxx')
browser.get('https://passport.ceair.com/?redirectUrl=http%3A%2F%2Fwww.ceair.com%2F#/ffp')
token = browser.execute_script("return localStorage.getItem('apdid_data')")
print(token)
posted @ 2020-07-18 18:24  SJL0327  阅读(3686)  评论(0编辑  收藏  举报