sc-common-interface 2.6.8__tar.gz → 2.7.0__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.6.8/sc_common_interface.egg-info → sc_common_interface-2.7.0}/PKG-INFO +2 -2
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface/LiveCommonInterface.py +6 -9
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0/sc_common_interface.egg-info}/PKG-INFO +1 -1
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/setup.py +2 -2
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface/McCommonInterface.py +0 -0
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/setup.cfg +0 -0
{sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -268,7 +268,7 @@ def send__live_comment(data):
|
|
|
268
268
|
if "-" in post_id:
|
|
269
269
|
post_id = post_id.split("_")[-1]
|
|
270
270
|
else:
|
|
271
|
-
print("----")
|
|
271
|
+
# print("----")
|
|
272
272
|
relationUrl = data["relationUrl"]
|
|
273
273
|
match = re.search(r'groups/(\d+)/posts/(\d+)/', relationUrl)
|
|
274
274
|
group_id = match.group(1)
|
|
@@ -278,14 +278,14 @@ def send__live_comment(data):
|
|
|
278
278
|
"from":{"id":user_id,"name":name},"group_id":group_id,"post_id":post_id,"comment_id":comment_id,"created_time":stamp,"item":"comment",
|
|
279
279
|
"verb":"add","parent_id":post_id,"field":"group_feed"}]}]}
|
|
280
280
|
|
|
281
|
-
print(body)
|
|
281
|
+
# print(body)
|
|
282
282
|
url = "%s/facebook/webhook" % env
|
|
283
283
|
sign_text = hmac.new(key.encode("utf-8"), json.dumps(body).encode("utf-8"), sha1)
|
|
284
284
|
signData = sign_text.hexdigest()
|
|
285
285
|
# print("body", json.dumps(body))
|
|
286
286
|
header = {"Content-Type": "application/json", "x-hub-signature": "sha1=%s" % signData}
|
|
287
287
|
response = requests.post(url, headers=header, data=json.dumps(body))
|
|
288
|
-
print(response.text)
|
|
288
|
+
# print(response.text)
|
|
289
289
|
return user_id, name, comment_id
|
|
290
290
|
|
|
291
291
|
def send_mc_message(data):
|
|
@@ -349,7 +349,7 @@ def send_mc_message(data):
|
|
|
349
349
|
header = {"Content-Type": "application/json", "x-hub-signature": "sha1=%s" % signData}
|
|
350
350
|
response = requests.post(url, headers=header, data=json.dumps(body))
|
|
351
351
|
# print(response.text)
|
|
352
|
-
print(body)
|
|
352
|
+
# print(body)
|
|
353
353
|
return user_id, name
|
|
354
354
|
|
|
355
355
|
|
|
@@ -370,7 +370,7 @@ def get_live_info(data):
|
|
|
370
370
|
else:
|
|
371
371
|
count=count+1
|
|
372
372
|
if count>10:
|
|
373
|
-
print("
|
|
373
|
+
print("查询报错:",response)
|
|
374
374
|
return response
|
|
375
375
|
|
|
376
376
|
|
|
@@ -2005,10 +2005,7 @@ if __name__=="__main__":
|
|
|
2005
2005
|
sales_id= create_live(data)
|
|
2006
2006
|
data["sales_id"] = sales_id
|
|
2007
2007
|
delete_relate_post(data)
|
|
2008
|
-
|
|
2009
|
-
data["key"] = "5e3bba98882fc0fb22a0607238bc5b8f"
|
|
2010
|
-
del data["post_id"]
|
|
2011
|
-
send__live_comment(data)
|
|
2008
|
+
|
|
2012
2009
|
|
|
2013
2010
|
|
|
2014
2011
|
|
{sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.6.8 → sc_common_interface-2.7.0}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|