Arthur-Wu committed this file on 2024-11-21
This commit is contained in:
@ -8,9 +8,9 @@ from commons.SignatureYM import SignatureYM2
|
||||
|
||||
|
||||
class YMClientApi(object):
|
||||
def __init__(self):
|
||||
def __init__(self, ShoppingCartMac):
|
||||
self.Domain = "https://api.test.yimaogo.com/cart"
|
||||
self.headerss = SignatureYM2(Mac="b8:2d:28:04:c7:5c")._headers()
|
||||
self.headerss = SignatureYM2(ShoppingCartMac)._headers()
|
||||
|
||||
''' 1- without sessionid '''
|
||||
def get_ads_list(self):
|
||||
@ -99,8 +99,9 @@ class YMClientApi(object):
|
||||
"deleteGoods": [],
|
||||
"existGoods": [],
|
||||
"orderNo": LoginData["data"][0]["orderNo"]
|
||||
})
|
||||
}, indent=4, ensure_ascii=False)
|
||||
url = self.Domain+"/v2/shopping/add/retire/purchase"
|
||||
logging.info(f"---加购商品请求体payload: {payload}---")
|
||||
response = requests.request("POST", url, headers=self.headerss, data=payload)
|
||||
logging.info(f"-----------接口返回状态码:{response.status_code}")
|
||||
logging.info(f"-----------接口返回数据:{response.json()}\n\n")
|
||||
|
Reference in New Issue
Block a user