模拟登陆饿了吗商户版的时候遇到了这个id不知道怎么获取。模拟登陆知乎中 from data 中有_xsrf参数,但这个id参数和_xsrf的获取方法不一样,无法从登陆界面源代码中获取import requestsfrom multiprocessing.dummy import Pool as ThreadPoolfrom lxml import etreeimport timeimport randomimport csvimport jsonurl ='https://melody.shop.ele.me/login'formdata = { 'id': '', 'metas':{'appName':'melody','appVersion':'4.4.0','method':'loginByUsername','ncp':'2.0.0'}, 'params':{'captchaCode':'','loginedSessionIds':[],'password':'xxxx','username':'xxxx','service':'LoginService'} }s = requests.Session()s.headers = { 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko'}z = s.post(url = url,data = formdata)
添加回答
举报
0/150
提交
取消