lazyad 0.0.59__py3-none-any.whl → 0.0.61__py3-none-any.whl

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.

Potentially problematic release.


This version of lazyad might be problematic. Click here for more details.

@@ -319,3 +319,59 @@ def xml_to_dict(xml_str):
319
319
  for row in rows[1:]
320
320
  ]
321
321
  return data_list
322
+
323
+
324
+ def history(
325
+ cookie: str,
326
+ page: int = 1,
327
+ page_size: int = 50,
328
+ timezone: int = 8,
329
+ start_time: str = None,
330
+ end_time: str = None,
331
+ objective_type: str = "adv_offer",
332
+ objective: list = None,
333
+ operator: list = None,
334
+ operation: list = None,
335
+ feature: list = None
336
+ ):
337
+ """
338
+ 获取 操作日志
339
+ 需要登录:{'code': 400, 'msg': 'Please login first', 'data': None}
340
+ 验证成功:{'code': 200, 'msg': 'success', 'data': {}
341
+ """
342
+ scheme = "https"
343
+ host = "ss-api.mintegral.com"
344
+ filename = "api/v1/history/index"
345
+ if not start_time:
346
+ start_time = lazytime.get_datetime_relative(days=-7)
347
+ if not end_time:
348
+ end_time = lazytime.get_datetime_relative(days=1)
349
+ if not objective:
350
+ objective = []
351
+ if not operator:
352
+ operator = []
353
+ if not operation:
354
+ operation = []
355
+ if not feature:
356
+ feature = []
357
+ data = {
358
+ "limit": page_size,
359
+ "page": page,
360
+ "timezone": str(timezone),
361
+ "start_time": start_time,
362
+ "end_time": end_time,
363
+ "objective_type": objective_type,
364
+ "objective": objective,
365
+ "operator": operator,
366
+ "operation": operation,
367
+ "feature": feature
368
+ }
369
+ url = f"{scheme}://{host}{filename}"
370
+ headers = copy.deepcopy(default_headers)
371
+ headers["Cookie"] = cookie
372
+ return lazyrequests.lazy_requests(
373
+ method="POST",
374
+ data=data,
375
+ url=url,
376
+ headers=headers
377
+ )
@@ -0,0 +1,37 @@
1
+ # 微盛,企业管家 https://platform.wshoto.com
2
+ from lazysdk import lazyrequests
3
+ import copy
4
+
5
+
6
+ default_headers = {
7
+ "Accept": "application/json, text/plain, */*",
8
+ "Accept-Encoding": "gzip, deflate, zstd",
9
+ "Accept-Language": "en-US,en;q=0.5",
10
+ "Cache-Control": "no-cache",
11
+ "Connection": "keep-alive",
12
+ "Host": "platform.wshoto.com",
13
+ "Origin": "https://platform.wshoto.com",
14
+ "Pragma": "no-cache",
15
+ "Referer": "https://platform.wshoto.com/index/dashboard",
16
+ "Sec-Fetch-Dest": "empty",
17
+ "Sec-Fetch-Mode": "cors",
18
+ "Sec-Fetch-Site": "same-origin",
19
+ "TE": "trailers",
20
+ "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0",
21
+ "x-admin-header": "1",
22
+ "x-clientType-header": "pc",
23
+ "x-header-host": "platform.wshoto.com",
24
+ }
25
+
26
+
27
+ def dashboard(
28
+ authorization: str
29
+ ):
30
+ url = "https://platform.wshoto.com/bff/index/private/pc/dashboard?saMode=SECRET"
31
+ headers = copy.deepcopy(default_headers)
32
+ headers["Authorization"] = authorization
33
+ return lazyrequests.lazy_requests(
34
+ method="POST",
35
+ url=url,
36
+ headers=headers
37
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.59
3
+ Version: 0.0.61
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -8,8 +8,8 @@ Author-email: zeroseeker@foxmail.com
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Operating System :: OS Independent
10
10
  Description-Content-Type: text/markdown
11
- Requires-Dist: lazysdk >=0.1.88
12
- Requires-Dist: xmltodict ==0.14.2
11
+ Requires-Dist: lazysdk>=0.1.88
12
+ Requires-Dist: xmltodict==0.14.2
13
13
 
14
14
  # lazyad
15
15
 
@@ -1,15 +1,16 @@
1
1
  lazyad/__init__.py,sha256=tnVTFEgdzgMWQI0mZqy3DAueMJjpypPb15DdxJ-9TiU,41
2
2
  lazyad/crawlers/__init__.py,sha256=GK3GGpiUJbESc1uGTwSmEnsSUwYDNZfJCxeLYB4CpS4,68
3
3
  lazyad/crawlers/chuangliang.py,sha256=QsEKTKcLn2WC3kW9pHnRG2O30r1kC2mmS-CSO7IKpaw,25794
4
- lazyad/crawlers/mintegral.py,sha256=awhS2yb48nh5f_yENyUy_vsleuMivrBsYbqrM7eS2jM,9622
4
+ lazyad/crawlers/mintegral.py,sha256=McNC2C5Nv-XWRjyPxrAV3nM_wr5zGF7p_AehiLnyuAs,11153
5
5
  lazyad/crawlers/oceanengine.py,sha256=kjBEpCb_h5OpodCTqzvXd5MBBwAuw3Oq5UKWoTCXrQM,4540
6
6
  lazyad/crawlers/qq.py,sha256=X_VjdgzAcDfckEAHrvdqBLtnmAuCBHPJVWu2H-IHZBA,5649
7
+ lazyad/crawlers/wshoto.py,sha256=3xckDjK-BpEGPMLHUBgQ8OWuUq77EBL9f7d4j0jwuAY,1224
7
8
  lazyad/open/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
9
  lazyad/open/kuaishou.py,sha256=B4wz3XW1hLQy7XR_nDQwrMUrYnm9Djec7OXKXRdiYXc,635
9
10
  lazyad/open/mintegral.py,sha256=BXCaCfnz2iUsR-RtDSA8I27KSK8r4v3xkZfllD9q_vY,12788
10
11
  lazyad/open/qq.py,sha256=pru1p4LCjURD9N5ukx-OStYAmDCvrTW4VMB2N0-3i5Q,6904
11
12
  lazyad/open/unity.py,sha256=A0tEN5k40xq0v1cRnTLwRN5N7CBIe2oAyMRH1uxDAEw,8493
12
- lazyad-0.0.59.dist-info/METADATA,sha256=IiSfmBQWG1tLd98pEkPXn6iXml726bDctSLtMzty7IA,1918
13
- lazyad-0.0.59.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
14
- lazyad-0.0.59.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
15
- lazyad-0.0.59.dist-info/RECORD,,
13
+ lazyad-0.0.61.dist-info/METADATA,sha256=AasgmoENOqCZJZAEF-nAjssZmDothwzVJiwZy4iXw7U,1916
14
+ lazyad-0.0.61.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
15
+ lazyad-0.0.61.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
16
+ lazyad-0.0.61.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5