From 78bcb3f102a5373d64fcf54d038ded66eaeb0f7e Mon Sep 17 00:00:00 2001 From: linlin <1628708538@qq.com> Date: Fri, 8 Mar 2024 11:12:17 +0800 Subject: [PATCH] Add files via upload --- dddc.py | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/dddc.py b/dddc.py index 34300da..b0ee0f2 100644 --- a/dddc.py +++ b/dddc.py @@ -60,7 +60,7 @@ def send_notification_message(title): #初始化 print('============📣初始化📣============') #版本 -banappversion = '1.2.2' +banappversion = '1.2.3' try: m = requests.get('https://gitee.com/guadu6464/test/raw/master/banbeng.json').json() if banappversion == m['didi']: @@ -176,7 +176,10 @@ def diyi(uid,token): didiyouc(uid,token) except Exception as e: print('小错误') - + try: + didish(uid,token) + except Exception as e: + print('小错误') try: didiqc(uid,token) except Exception as e: @@ -273,7 +276,13 @@ def diyi(uid,token): coupon_conf_id = xu['coupon_conf_id'] data = {"lang":"zh-CN","token":token,"access_key_id":9,"appversion":appversion,"channel":1100000002,"_ds":"","xpsid":"d51af08a62ef4b43b1eb41deaae30379","xpsid_root":"0fa1ac9f38d24e43a4a2616319942c88","activity_id":activity_id,"group_id":group_id,"group_date":group_date,"coupon_conf_id":coupon_conf_id,"dchn":"wE7poOA","platform":"mp","city_id":33,"env":{"isHitButton":True,"newAppid":35009,"userAgent":"","openId":"","model":"2201122C","wifi":2,"timeCost":""}} ju = requests.post(url="https://ut.xiaojukeji.com/ut/janitor/api/action/coupon/bind", json=data, headers=headers).json() - myprint(f"{xu['name']}({xu['threshold_desc']}):{ju['errmsg']}") + + if ju['errmsg'] == 'success': + myprint(f"{xu['name']}({xu['threshold_desc']}):{ju['errmsg']}") + elif ju['errmsg'] == '领券失败请重试': + pass + else: + print(f"{xu['name']}({xu['threshold_desc']}):{ju['errmsg']}") time.sleep(1) myprint('------------------') @@ -461,7 +470,7 @@ def didiyouc(uid,token): else: myprint(tijiao['errmsg']) myprint('--------------') - data = {"xbiz":"240101","prod_key":"ut-dunion-dj","xpsid":"8c6b4325867d42198a2fe78c5b037475","dchn":"aqj1Xk5","xoid":"c5f5aeb5-19a4-4e60-9305-d45c37e48a27","xenv":"wxmp","xspm_from":"none.none.none.none","xpsid_root":"8c6b4325867d42198a2fe78c5b037475","xpsid_from":"","xpsid_share":"","dsi":"622554f9d87e57040413526a116ac629410nk8lu","source_id":"b08d62bd22133278c810","product_type":"didi","token":token,"city_id":33,"env":{"dchn":"aqj1Xk5","newTicket":token,"userAgent":"","fromChannel":"2","newAppid":"30012","openId":"","openIdType":"1","isHitButton":True,"isOpenWeb":True,"timeCost":13722,"cityId":"33","xAxes":"260.6571044921875","yAxes":"455.3142395019531"},"req_env":"wx","dunion_callback":""} + data = {"xbiz":"240101","prod_key":"ut-dunion-dj","xpsid":"1c7d655e5eb3436f8d2f2ce308398923","dchn":"E8g52z0","xoid":"a5e66d28-004a-4046-8b57-a88b360fb856","xenv":"h5","xspm_from":"","xpsid_root":"1c7d655e5eb3436f8d2f2ce308398923","xpsid_from":"","xpsid_share":"","dsi":"622554f9d87e57040413526a116ac629410nk8lu","source_id":"4a871f6eb9e4ee5568f0","product_type":"didi","token":token,"city_id":33,"lng":lng,"lat":lat,"env":{"dchn":"E8g52z0","newTicket":token,"latitude":lat,"longitude":lng,"userAgent":"","fromChannel":"8","newAppid":"30004","isHitButton":True,"isOpenWeb":True,"timeCost":36199,"cityId":"33","xAxes":"284.8856201171875","yAxes":"446.1429138183594"},"req_env":"h5","dunion_callback":""} tijiao = requests.post(url=youhui, json=data).json() if tijiao['errmsg'] == 'success': for yh in tijiao['data']['rewards']: @@ -480,6 +489,16 @@ def didiqc(uid,token): else: myprint(tijiao['errmsg']) +def didish(uid,token): + myprint('--------领取滴滴送货优惠券--------') + data = {"xbiz":"240101","prod_key":"ut-dunion-freight","xpsid":"8288fd529cd5477da142540d10bb8118","dchn":"b8Ml9nz","xoid":"e8e2f046-aea0-4424-bd88-3d7c5f6dadf7","xenv":"h5","xspm_from":"","xpsid_root":"8288fd529cd5477da142540d10bb8118","xpsid_from":"","xpsid_share":"","env":{"dchn":"b8Ml9nz","newTicket":token,"latitude":lat,"longitude":lng,"cityId":"33","userAgent":"","fromChannel":"8","newAppid":"30004","isHitButton":False,"isOpenWeb":True,"timeCost":9479},"req_env":"h5","dsi":"cc89fc2474673c8f979db1121d02b4db410sd2eu","source_id":"4a871f6eb9e4ee5568f0","product_type":"didi","lng":lng,"lat":lat,"token":token,"phone":"","uid":"","city_id":33} + tijiao = requests.post(url=youhui, json=data).json() + if tijiao['errmsg'] == 'success': + for yh in tijiao['data']['rewards']: + myprint(f"获取到{yh['coupon']['max_benefit_capacity']['value']}{yh['coupon']['max_benefit_capacity']['unit']} {yh['coupon']['name']} {yh['coupon']['remark']}") + else: + myprint(tijiao['errmsg']) + def yq(uid,token): headers = {'content-type':'application/json'} data = {"lang": "zh-CN","access_key_id": 9,"appversion": appversion,"channel": 1100000005,"_ds": "","xpsid": "","xpsid_root": "","root_xpsid": "","f_xpsid": "","xbiz": "110105","prod_key": "wyc-cpc-v-three","dchn": "kaxm7er","xoid": "ddaf1498-d170-4f3b-bcc7-541d12ee782f","xenv": "wxmp","xpsid_share": "","xspm_from": "none.none.none.none","args": {"invoke_key": "default","key": 299073592885446,"runtime_args": {"scene": 1037,"token": token,"lat": lat,"lng": lng,"env": {"dchn": "kaxm7er","newTicket": token,"model": "2201122C","fromChannel": "2","newAppid": "35009","openId": "","openIdType": "1","sceneId": "1007","isHitButton": False,"isOpenWeb": False,"timeCost": 199,"latitude": lat,"longitude": lng,"cityId": "","fromPage": "wyc-cpc-v-three/views/index/index","xAxes": "","yAxes": ""},"dsi": "fb98de6169fea3440a3cd5208f899286923sekiu","ncc": True,"x_test_user": {"key": 299073592885446}}},"need_page_config": True,"need_share_config": True,"xpsid_from": ""}