lazyad 0.0.4__tar.gz → 0.0.5__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.

Potentially problematic release.


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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -0,0 +1,3 @@
1
+ from . import qq
2
+ from . import oceanengine
3
+ from . import chuangliang
@@ -0,0 +1,54 @@
1
+ from lazysdk import lazyrequests
2
+ import copy
3
+
4
+ default_headers = {
5
+ "Accept": "application/json, text/plain, */*",
6
+ "Accept-Encoding": "gzip, deflate",
7
+ "Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2",
8
+ "Connection": "keep-alive",
9
+ "Host": "cli2.mobgi.com",
10
+ "Origin": "https://cl.mobgi.com",
11
+ "Referer": "https://cl.mobgi.com/",
12
+ "Sec-Fetch-Dest": "empty",
13
+ "Sec-Fetch-Mode": "cors",
14
+ "Sec-Fetch-Site": "same-site",
15
+ "TE": "trailers",
16
+ "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0",
17
+ }
18
+
19
+
20
+ def get_media_account(
21
+ media_type: str,
22
+ cookie: str = None,
23
+ page: int = 1,
24
+ page_size: int = 20,
25
+ total_count: int = 0
26
+ ):
27
+ """
28
+ 获取 推广-账户管理下的账户列表
29
+ :param media_type: 媒体类型
30
+ :param cookie:
31
+ :param page:
32
+ :param page_size:
33
+ :param total_count:
34
+ :return:
35
+ """
36
+
37
+ url = 'https://cli2.mobgi.com/Media/Account/getList'
38
+ data = {
39
+ "media_type": media_type,
40
+ "advertiser_type": "1",
41
+ "page": page,
42
+ "page_size": page_size,
43
+ "total_count": total_count
44
+ }
45
+ headers = copy.deepcopy(default_headers)
46
+ headers["Cookie"] = cookie
47
+
48
+ return lazyrequests.lazy_requests(
49
+ method='POST',
50
+ url=url,
51
+ json=data,
52
+ headers=headers,
53
+ return_json=True
54
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -7,5 +7,6 @@ lazyad.egg-info/dependency_links.txt
7
7
  lazyad.egg-info/requires.txt
8
8
  lazyad.egg-info/top_level.txt
9
9
  lazyad/crawlers/__init__.py
10
+ lazyad/crawlers/chuangliang.py
10
11
  lazyad/crawlers/oceanengine.py
11
12
  lazyad/crawlers/qq.py
@@ -13,7 +13,7 @@ with open("README.md", "r", encoding='utf-8') as fh:
13
13
 
14
14
  setuptools.setup(
15
15
  name="lazyad",
16
- version="0.0.4",
16
+ version="0.0.5",
17
17
  description="基于Python的懒人包-适用于广告投放模块",
18
18
  long_description=long_description,
19
19
  long_description_content_type="text/markdown",
@@ -1,2 +0,0 @@
1
- from . import qq
2
- from . import oceanengine
File without changes
File without changes
File without changes
File without changes