sc-common-interface 3.2.8__tar.gz → 3.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/PKG-INFO +1 -1
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/PostCommonInterface.py +7 -6
- sc_common_interface-3.2.9/sc_common_interface/ScPulsar.py +36 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/setup.py +1 -1
- sc_common_interface-3.2.8/sc_common_interface/ScPulsar.py +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/CommonOa.py +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/LiveCommonInterface.py +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/McCommonInterface.py +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/OperaMysql.py +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/OperaRedis.py +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/ScWebsocket.py +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/__init__.py +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/pra.py +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/setup.cfg +0 -0
{sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/PostCommonInterface.py
RENAMED
|
@@ -818,8 +818,10 @@ def send_post_comment(data):
|
|
|
818
818
|
sign_text = hmac.new(key.encode("utf-8"), json.dumps(body).encode("utf-8"), sha1)
|
|
819
819
|
signData = sign_text.hexdigest()
|
|
820
820
|
# print("body",json.dumps(body))
|
|
821
|
-
header = {"Content-Type": "application/json", "
|
|
821
|
+
header = {"Content-Type": "application/json", "X-Hub-Signature": "sha1=%s" % signData}
|
|
822
822
|
response = requests.post(url, headers=header, data=json.dumps(body))
|
|
823
|
+
# print(header)
|
|
824
|
+
print(response.text)
|
|
823
825
|
return user_id,name,comment_id
|
|
824
826
|
|
|
825
827
|
def get_payment(data):
|
|
@@ -831,7 +833,7 @@ def get_payment(data):
|
|
|
831
833
|
env = data["env"]
|
|
832
834
|
oc_env = data["oc_env"]
|
|
833
835
|
headers = data["headers"]
|
|
834
|
-
url ="%s/openApi/proxy/v1/payments?page=1&per_page=10&include_fields[]=config_data.tappay"%oc_env
|
|
836
|
+
url ="%s/internal/openApi/proxy/v1/payments?page=1&per_page=10&include_fields[]=config_data.tappay"%oc_env
|
|
835
837
|
response = requests.get(url, headers=headers).json()
|
|
836
838
|
payment_types = [item["type"] for item in response["data"]["items"]]
|
|
837
839
|
payment_id = ""
|
|
@@ -856,7 +858,7 @@ def get_delivery(data):
|
|
|
856
858
|
env = data["env"]
|
|
857
859
|
oc_env = data["oc_env"]
|
|
858
860
|
headers = data["headers"]
|
|
859
|
-
url = "%s/openApi/proxy/v1/delivery_options?page=1&per_page=998"%oc_env
|
|
861
|
+
url = "%s/internal/openApi/proxy/v1/delivery_options?page=1&per_page=998"%oc_env
|
|
860
862
|
response = requests.get(url, headers=headers).json()
|
|
861
863
|
# print(response)
|
|
862
864
|
delivery_types = [item["region_type"] for item in response["data"]["items"]]
|
|
@@ -1744,6 +1746,5 @@ def edit_message(data):
|
|
|
1744
1746
|
|
|
1745
1747
|
|
|
1746
1748
|
if __name__=="__main__":
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
print(res)
|
|
1749
|
+
pass
|
|
1750
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import json,hashlib,hmac,base64
|
|
2
|
+
import requests
|
|
3
|
+
import json
|
|
4
|
+
import time
|
|
5
|
+
import random
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def send_sc1_live_comment():
|
|
10
|
+
url = "https://api-webhook-stg.myshoplinestg.com/api/sc/webhook/facebook"
|
|
11
|
+
timestamp = int(time.time()*1000)
|
|
12
|
+
timestamp2 = int(time.time())
|
|
13
|
+
key = "5360b4bbeb2ec0d6163aafdac03aa19f"
|
|
14
|
+
user_id = "2612853078%d"%timestamp
|
|
15
|
+
message = "A1+1"
|
|
16
|
+
post_id = "112629511247093_1647995003396624"
|
|
17
|
+
page_id = "112629511247093"
|
|
18
|
+
comment_id= "%s_9485663%d"%(page_id,timestamp)
|
|
19
|
+
contentbody = {"entry": [{"id": "112629511247093", "time": timestamp2, "changes": [{"value": {"from": {"id": user_id, "name": "Wenying Lu%d"%timestamp}, "post": {"status_type": "added_video", "is_published": True, "updated_time": "2026-11-12T09:29:17+0000", "permalink_url": "https://www.facebook.com/921678130420688/videos/1157984883548317", "promotion_status": "inactive", "id": "112629511247093_1157984883548317"}, "message": message, "post_id": "112629511247093_1157984883548317", "comment_id": comment_id, "created_time": timestamp2, "item": "comment", "parent_id": "112629511247093_1157984883548317", "verb": "add"}, "field": "feed"}]}], "object": "page"}
|
|
20
|
+
signdata = hmac.new(key.encode('utf-8'),json.dumps(contentbody).encode('utf-8'),hashlib.sha1).hexdigest()
|
|
21
|
+
contentbody = json.dumps(contentbody)
|
|
22
|
+
header = {"Content-Type":"application/json","x-hub-signature":"sha1=%s"%signdata}
|
|
23
|
+
res = requests.post(url,headers=header,data=contentbody)
|
|
24
|
+
# print(contentbody)
|
|
25
|
+
# print(res.text)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
if __name__ == "__main__":
|
|
30
|
+
for i in range(500):
|
|
31
|
+
send_sc1_live_comment()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
File without changes
|
|
File without changes
|
{sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
File without changes
|
{sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc_common_interface-3.2.8 → sc_common_interface-3.2.9}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|