|
@@ -1,42 +1,11 @@
|
|
|
-
|
|
|
|
|
-#======================= test =========================#
|
|
|
|
|
-
|
|
|
|
|
-import requests
|
|
|
|
|
-import json
|
|
|
|
|
-
|
|
|
|
|
-game_id=456
|
|
|
|
|
-user_id=123
|
|
|
|
|
-
|
|
|
|
|
-url = "http://onlyellow.cstor.cn:18888/launch_refund"
|
|
|
|
|
-
|
|
|
|
|
-server_logs = "[Server] 2020/06/16 09:52:56 Refund ID: 22f6f61f-d573-4eff-963a-708983317057"
|
|
|
|
|
-sp_log = server_logs.split(' ', -1)
|
|
|
|
|
-refund_id = sp_log[5]
|
|
|
|
|
-# print(refund_id)
|
|
|
|
|
-data = json.dumps({"user_id":user_id, "game_id":game_id, "refund_id":refund_id})
|
|
|
|
|
-response = requests.post(url=url, data=data)
|
|
|
|
|
-print(response)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-data_a = {"user_id":user_id, "game_id":game_id, "refund_id":refund_id}
|
|
|
|
|
-print(type(data_a))
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-#======================= comp =========================#
|
|
|
|
|
-
|
|
|
|
|
-# AWS logs 配置筛选器、筛选模式(Refund、Refund)
|
|
|
|
|
-
|
|
|
|
|
import json
|
|
import json
|
|
|
import urllib.request
|
|
import urllib.request
|
|
|
import urllib.parse
|
|
import urllib.parse
|
|
|
import base64
|
|
import base64
|
|
|
import gzip
|
|
import gzip
|
|
|
-# import requests
|
|
|
|
|
|
|
|
|
|
def lambda_handler(event, context):
|
|
def lambda_handler(event, context):
|
|
|
|
|
|
|
|
- #双引号(字符串类型),下面的json.dumps也有双引号,
|
|
|
|
|
- #int类型,下面的json.dumps没有双引号
|
|
|
|
|
game_id=456
|
|
game_id=456
|
|
|
user_id=123
|
|
user_id=123
|
|
|
|
|
|
|
@@ -49,14 +18,13 @@ def lambda_handler(event, context):
|
|
|
if len(tup_log[5]) == 36:
|
|
if len(tup_log[5]) == 36:
|
|
|
refund_id = tup_log[5]
|
|
refund_id = tup_log[5]
|
|
|
data = json.dumps({"user_id":user_id, "game_id":game_id, "refund_id":refund_id})
|
|
data = json.dumps({"user_id":user_id, "game_id":game_id, "refund_id":refund_id})
|
|
|
- # 注意格式
|
|
|
|
|
last_data=bytes(data,encoding='utf-8')
|
|
last_data=bytes(data,encoding='utf-8')
|
|
|
headers = {"Content-Type":'application/json'}
|
|
headers = {"Content-Type":'application/json'}
|
|
|
req = urllib.request.Request(url=url, headers=headers, data=last_data)
|
|
req = urllib.request.Request(url=url, headers=headers, data=last_data)
|
|
|
response = urllib.request.urlopen(req)
|
|
response = urllib.request.urlopen(req)
|
|
|
print(response.read().decode('utf-8'))
|
|
print(response.read().decode('utf-8'))
|
|
|
else:
|
|
else:
|
|
|
- pass
|
|
|
|
|
|
|
+ print('hhhhhhhhhhhhaaaaaaaaaa')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|