sc-common-interface 2.6.2__tar.gz → 2.6.4__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.2 → sc-common-interface-2.6.4}/PKG-INFO +1 -1
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface/LiveCommonInterface.py +15 -4
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface.egg-info/requires.txt +1 -0
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/setup.py +2 -1
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface/McCommonInterface.py +0 -0
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/setup.cfg +0 -0
{sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -7,8 +7,15 @@ import random
|
|
|
7
7
|
import hmac
|
|
8
8
|
from hashlib import sha1
|
|
9
9
|
import random
|
|
10
|
-
from PostCommonInterface import *
|
|
10
|
+
# from PostCommonInterface import *
|
|
11
11
|
|
|
12
|
+
def delete_post(data):
|
|
13
|
+
env = data["env"]
|
|
14
|
+
headers = data["headers"]
|
|
15
|
+
sales_id = data["sales_id"]
|
|
16
|
+
url = "%s/api/posts/post/sales/%s"%(env,sales_id)
|
|
17
|
+
res = requests.delete(url, headers=headers).json()
|
|
18
|
+
return res
|
|
12
19
|
|
|
13
20
|
def delete_relate_post(data):
|
|
14
21
|
"""删除串接的facebook或fb group 避免影响串接"""
|
|
@@ -50,7 +57,7 @@ def delete_relate_post(data):
|
|
|
50
57
|
fb_post_id = i["post_id"]
|
|
51
58
|
# print("fb_post_id",fb_post_id)
|
|
52
59
|
# print("post_id", post_id)
|
|
53
|
-
if fb_post_id.strip()
|
|
60
|
+
if fb_post_id.strip() in post_id:
|
|
54
61
|
print("找到串接的帖文:%s"%sales_id)
|
|
55
62
|
res = delete_post(data)
|
|
56
63
|
# print(res)
|
|
@@ -58,10 +65,14 @@ def delete_relate_post(data):
|
|
|
58
65
|
elif platform.lower()=="fb_group":
|
|
59
66
|
for i in relatedPostList:
|
|
60
67
|
permalink_url = i["permalink_url"]
|
|
61
|
-
|
|
68
|
+
permalink_url = permalink_url.split("permalink/")[-1]
|
|
69
|
+
id_list = []
|
|
70
|
+
for id in post_id:
|
|
71
|
+
idData = id.split("posts/")[-1]
|
|
72
|
+
id_list.append(idData)
|
|
62
73
|
# print("permalink_url",permalink_url)
|
|
63
74
|
# print("post_id", post_id)
|
|
64
|
-
if
|
|
75
|
+
if permalink_url.strip() in id_list:
|
|
65
76
|
print("找到串接的帖文:%s" % sales_id)
|
|
66
77
|
res = delete_post(data)
|
|
67
78
|
return res
|
|
@@ -2,12 +2,13 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='sc-common-interface',
|
|
5
|
-
version='2.6.
|
|
5
|
+
version='2.6.4',
|
|
6
6
|
description='SC贴文销售公用的接口',
|
|
7
7
|
author='river',
|
|
8
8
|
packages=find_packages(),
|
|
9
9
|
install_requires=[
|
|
10
10
|
"requests>=2.0.0",
|
|
11
11
|
"jsonpath>=0.82",
|
|
12
|
+
"sc-common-interface>=2.6.2"
|
|
12
13
|
],
|
|
13
14
|
)
|
{sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.6.2 → sc-common-interface-2.6.4}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|