接口
url:https://web.baimiaoapp.com/
x-auth-token:
x-auth-uuid:
研究下这两个参数怎么来的
定位参数
方式较简单,直接全局搜索即可。
下断点后,再次识别触发断点。
跟进 r.a.prototype.$ls.get后
这里就清楚了,token和uuid存放在localStorage里
s.py
from selenium import webdriver
from selenium.webdriver import ChromeOptions
options = webdriver.ChromeOptions()
options.headless =True
driver = webdriver.Chrome(options=options)
driver.get("https://web.baimiaoapp.com/")
# driver.implicitly_wait(3)
data = driver.execute_script("return localStorage.getItem('token') + '_' + localStorage.getItem('uuid')")
print(data)
运行结果:
5qYuJOhCL7VovgHnvnjX3nV8IVLwfyuvCRSQkvqC49nvCPYGdFw73lBrffRAHAwj_6e12b4aa-e1c0-4697-95b9-55f67d80e6bb