Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- driver.execute_script("""var url = `https://m.aliexpress.com/api/order/place`;
- # var data = new URLSearchParams({
- # payMethod: 'others',
- # subPayMethod: 'others',
- # paymentGateway: 'ALIPAY',
- # currency: 'USD',
- # orderFrom: 'msiteShopcart',
- # orderType: 'Normal',
- # timeZone: '-120',
- # selectedAddressId: """ + str(dupa) + """,
- # country: 'CZ',
- # productJsonString: JSON.stringify([
- # {
- # productId: '4000083214503',
- # productUniqueKey: '4000083214503',
- # skuAttr: '14:193',
- # quantity: '1',
- # serviceName: 'POST_NL',
- # orderMemo: ''
- # }
- # ]),
- # payAction: 'switchChannel',
- # aeCouponId: '',
- # useShoppingCoupon: false,
- # haveAcrossStoreSelectCoupon: false
- # }).toString();
- #
- # var params = {
- # body: data,
- # method: 'POST',
- # headers: {
- # cookie: document.cookie,
- # 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
- # }
- # };
- #
- # fetch(url, params)
- # .then(data => {
- # return data.json();
- # })
- # .then(res => {
- # console.log(res);
- # console.log('OrderID:', res.data.placeOrderResult.orderIds[0]);
- # console.log('Timestamp:', res.data.placeOrderResult.timeStamp);
- # console.log('payToken:', res.data.placeOrderResult.payToken);
- # console.log('contractIds:', res.data.contractIds);
- # });""")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement