lazyad 0.0.12__tar.gz → 0.0.14__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.
- {lazyad-0.0.12 → lazyad-0.0.14}/PKG-INFO +1 -1
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad/open/qq.py +47 -1
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad.egg-info/PKG-INFO +1 -1
- {lazyad-0.0.12 → lazyad-0.0.14}/setup.py +1 -1
- {lazyad-0.0.12 → lazyad-0.0.14}/README.md +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad/__init__.py +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad/crawlers/__init__.py +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad/crawlers/chuangliang.py +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad/crawlers/oceanengine.py +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad/crawlers/qq.py +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad/open/__init__.py +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad.egg-info/SOURCES.txt +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad.egg-info/dependency_links.txt +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad.egg-info/requires.txt +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/lazyad.egg-info/top_level.txt +0 -0
- {lazyad-0.0.12 → lazyad-0.0.14}/setup.cfg +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import showlog
|
|
1
2
|
from lazysdk import lazyrequests
|
|
2
3
|
import random
|
|
3
4
|
import time
|
|
@@ -84,7 +85,6 @@ def oauth_token3(
|
|
|
84
85
|
:param redirect_uri: 回调地址
|
|
85
86
|
:return:
|
|
86
87
|
"""
|
|
87
|
-
# url = 'https://api.e.qq.com/v3.0/oauth/token'
|
|
88
88
|
params = {
|
|
89
89
|
'client_id': app_id,
|
|
90
90
|
'client_secret': app_secret,
|
|
@@ -111,3 +111,49 @@ def oauth_token3(
|
|
|
111
111
|
url=url,
|
|
112
112
|
params=params
|
|
113
113
|
)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def get_organization_account_relation(
|
|
117
|
+
access_token: str,
|
|
118
|
+
account_id=None,
|
|
119
|
+
cursor=None,
|
|
120
|
+
page: int = 1,
|
|
121
|
+
page_size: int = 100,
|
|
122
|
+
pagination_mode: str = "PAGINATION_MODE_CURSOR"
|
|
123
|
+
):
|
|
124
|
+
"""
|
|
125
|
+
版本:3.0
|
|
126
|
+
获取子账号列表
|
|
127
|
+
这里获取子账户主要使用这个方法
|
|
128
|
+
https://developers.e.qq.com/v3.0/docs/api/organization_account_relation/get
|
|
129
|
+
:param access_token:
|
|
130
|
+
:param account_id:
|
|
131
|
+
:param cursor:
|
|
132
|
+
:param page:
|
|
133
|
+
:param page_size: 最小值 1,最大值 100
|
|
134
|
+
:param pagination_mode: 分页方式,注意,为PAGINATION_MODE_NORMAL时,不能获取大于1000条的记录
|
|
135
|
+
:return:
|
|
136
|
+
"""
|
|
137
|
+
url = 'https://api.e.qq.com/v3.0/organization_account_relation/get'
|
|
138
|
+
params = {
|
|
139
|
+
'access_token': access_token,
|
|
140
|
+
'timestamp': int(time.time()),
|
|
141
|
+
'nonce': make_nonce(),
|
|
142
|
+
"pagination_mode": pagination_mode,
|
|
143
|
+
"page_size": page_size
|
|
144
|
+
}
|
|
145
|
+
if pagination_mode == "PAGINATION_MODE_NORMAL":
|
|
146
|
+
params["page"] = page
|
|
147
|
+
elif pagination_mode == "PAGINATION_MODE_CURSOR":
|
|
148
|
+
params["cursor"] = cursor
|
|
149
|
+
else:
|
|
150
|
+
showlog.warning("pagination_mode参数错误")
|
|
151
|
+
return
|
|
152
|
+
|
|
153
|
+
if account_id:
|
|
154
|
+
params["account_id"] = account_id
|
|
155
|
+
return lazyrequests.lazy_requests(
|
|
156
|
+
method="GET",
|
|
157
|
+
url=url,
|
|
158
|
+
params=params
|
|
159
|
+
)
|
|
@@ -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.
|
|
16
|
+
version="0.0.14",
|
|
17
17
|
description="基于Python的懒人包-适用于广告投放模块",
|
|
18
18
|
long_description=long_description,
|
|
19
19
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|