sc-common-interface 2.0.8__tar.gz → 2.1.1__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.0.8 → sc-common-interface-2.1.1}/PKG-INFO +1 -1
- {sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface/PostCommonInterface.py +18 -5
- {sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/setup.py +1 -1
- {sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/setup.cfg +0 -0
{sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface/PostCommonInterface.py
RENAMED
|
@@ -11,6 +11,8 @@ import random
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
platform = "FACEBOOK"
|
|
14
|
+
count = 0
|
|
15
|
+
num = 100
|
|
14
16
|
def create_general_post(data):
|
|
15
17
|
"""创建普通贴文销售,返回响应和贴文销售ID
|
|
16
18
|
sc_common_interface
|
|
@@ -56,7 +58,7 @@ def create_general_post(data):
|
|
|
56
58
|
time.sleep(1)
|
|
57
59
|
finally:
|
|
58
60
|
count += 1
|
|
59
|
-
if count >
|
|
61
|
+
if count > num:
|
|
60
62
|
break
|
|
61
63
|
response = response.json()
|
|
62
64
|
print("创建贴文返回",response)
|
|
@@ -108,7 +110,7 @@ def create_commerce_post(data):
|
|
|
108
110
|
time.sleep(1)
|
|
109
111
|
finally:
|
|
110
112
|
count +=1
|
|
111
|
-
if count>
|
|
113
|
+
if count>num:
|
|
112
114
|
break
|
|
113
115
|
response = response.json()
|
|
114
116
|
# print(response)
|
|
@@ -345,6 +347,12 @@ def get_page_post(data):
|
|
|
345
347
|
fb group:GROUP_POST
|
|
346
348
|
:return:响应
|
|
347
349
|
"""
|
|
350
|
+
#时间戳转换
|
|
351
|
+
#1.最近7天
|
|
352
|
+
current_time = datetime.datetime.now()
|
|
353
|
+
last3 = int((current_time - datetime.timedelta(days=3)).timestamp())
|
|
354
|
+
|
|
355
|
+
|
|
348
356
|
env = data["env"]
|
|
349
357
|
headers = data["headers"]
|
|
350
358
|
platform = "FACEBOOK"
|
|
@@ -359,9 +367,14 @@ def get_page_post(data):
|
|
|
359
367
|
type = "POST"
|
|
360
368
|
if "type" in data:
|
|
361
369
|
type = data["type"]
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
370
|
+
days = 180
|
|
371
|
+
since = int((current_time - datetime.timedelta(days=int(days))).timestamp())
|
|
372
|
+
if "days" in data:
|
|
373
|
+
days = data["days"]
|
|
374
|
+
since = int((current_time - datetime.timedelta(days=int(days))).timestamp())
|
|
375
|
+
# since = 1699027200
|
|
376
|
+
# if "since" in data:
|
|
377
|
+
# since = data["since"]
|
|
365
378
|
page_size = 50
|
|
366
379
|
if "page_size" in data:
|
|
367
380
|
page_size = data
|
|
File without changes
|
{sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.0.8 → sc-common-interface-2.1.1}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|