python爬虫获取localStorage中的数据(获取token)
2021-04-14 15:26
标签:storage bdr driver als image loading web info ora python爬虫获取localStorage中的数据(获取token) 标签:storage bdr driver als image loading web info ora 原文地址:https://www.cnblogs.com/lishuaijiang/p/13336798.html# 此为获取东航登录时的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)
上一篇:线程的基本状态
文章标题:python爬虫获取localStorage中的数据(获取token)
文章链接:http://soscw.com/index.php/essay/75716.html