模拟登陆饿了吗商户版的时候遇到了
这个id不知道怎么获取。
模拟登陆知乎中 from data 中有_xsrf参数,但这个id参数和_xsrf的获取方法不一样,无法从登陆界面源代码中获取
import requests
from multiprocessing.dummy import Pool as ThreadPool
from lxml import etree
import time
import random
import csv
import json
url ='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)
相关分类