sc-common-interface 2.3.1__tar.gz → 2.3.2__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-2.3.1 → sc-common-interface-2.3.2}/PKG-INFO +1 -1
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface/LiveCommonInterface.py +23 -6
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/setup.py +1 -1
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/setup.cfg +0 -0
{sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -53,11 +53,27 @@ def end_activity(data):
|
|
|
53
53
|
def send__live_comment(data):
|
|
54
54
|
env = data["env"]
|
|
55
55
|
key = data["key"]
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
platform = "FACEBOOK"
|
|
57
|
+
page_id = ""
|
|
58
|
+
post_id = ""
|
|
59
|
+
if "page_id" in data:
|
|
60
|
+
page_id = data['page_id']
|
|
61
|
+
if "platform" in data:
|
|
62
|
+
platform = data['platform']
|
|
63
|
+
if "post_id" in data:
|
|
64
|
+
post_id = data['post_id']
|
|
65
|
+
if page_id == "" or post_id == "":
|
|
66
|
+
info = get_live_info(data)
|
|
67
|
+
platform_list = jsonpath(info, "$..relatedPostList..platform")
|
|
68
|
+
i = platform_list.index(platform)
|
|
69
|
+
page_id = info["data"]["relatedPostList"][i]["page_id"]
|
|
70
|
+
platform = info["data"]["relatedPostList"][i]["platform"]
|
|
71
|
+
post_id = info["data"]["relatedPostList"][i]["post_id"]
|
|
72
|
+
# info = get_live_info(data)
|
|
73
|
+
# related_post_list = info["data"]["relatedPostList"][0]
|
|
74
|
+
# page_id = related_post_list["page_id"]
|
|
75
|
+
# post_id = related_post_list["post_id"]
|
|
76
|
+
# platform = related_post_list["platform"]
|
|
61
77
|
stamp = int(time.time())
|
|
62
78
|
num = random.randint(100000, 999999)
|
|
63
79
|
user_id = "488864%d" % int(time.time())
|
|
@@ -88,13 +104,14 @@ def send__live_comment(data):
|
|
|
88
104
|
"media_product_type": "FEED"},
|
|
89
105
|
"id": comment_id, "text": keyword},
|
|
90
106
|
"field": "comments"}]}], "object": "instagram"}
|
|
91
|
-
|
|
107
|
+
print(body)
|
|
92
108
|
url = "%s/facebook/webhook" % env
|
|
93
109
|
sign_text = hmac.new(key.encode("utf-8"), json.dumps(body).encode("utf-8"), sha1)
|
|
94
110
|
signData = sign_text.hexdigest()
|
|
95
111
|
# print("body", json.dumps(body))
|
|
96
112
|
header = {"Content-Type": "application/json", "x-hub-signature": "sha1=%s" % signData}
|
|
97
113
|
response = requests.post(url, headers=header, data=json.dumps(body))
|
|
114
|
+
print(response.text)
|
|
98
115
|
return user_id, name, comment_id
|
|
99
116
|
|
|
100
117
|
def send_mc_message(data):
|
|
File without changes
|
{sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.3.1 → sc-common-interface-2.3.2}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|