sc-common-interface 2.0.9__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 2.0.9
3
+ Version: 2.1.1
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -347,6 +347,12 @@ def get_page_post(data):
347
347
  fb group:GROUP_POST
348
348
  :return:响应
349
349
  """
350
+ #时间戳转换
351
+ #1.最近7天
352
+ current_time = datetime.datetime.now()
353
+ last3 = int((current_time - datetime.timedelta(days=3)).timestamp())
354
+
355
+
350
356
  env = data["env"]
351
357
  headers = data["headers"]
352
358
  platform = "FACEBOOK"
@@ -361,9 +367,14 @@ def get_page_post(data):
361
367
  type = "POST"
362
368
  if "type" in data:
363
369
  type = data["type"]
364
- since = 1699027200
365
- if "since" in data:
366
- since = data["since"]
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"]
367
378
  page_size = 50
368
379
  if "page_size" in data:
369
380
  page_size = data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 2.0.9
3
+ Version: 2.1.1
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='sc-common-interface',
5
- version='2.0.9',
5
+ version='2.1.1',
6
6
  description='SC贴文销售公用的接口',
7
7
  author='river',
8
8
  packages=find_packages(),