lazyad 0.0.13__py3-none-any.whl → 0.0.15__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.
- lazyad/crawlers/qq.py +9 -4
- lazyad/open/qq.py +16 -4
- {lazyad-0.0.13.dist-info → lazyad-0.0.15.dist-info}/METADATA +1 -1
- {lazyad-0.0.13.dist-info → lazyad-0.0.15.dist-info}/RECORD +6 -6
- {lazyad-0.0.13.dist-info → lazyad-0.0.15.dist-info}/WHEEL +0 -0
- {lazyad-0.0.13.dist-info → lazyad-0.0.15.dist-info}/top_level.txt +0 -0
lazyad/crawlers/qq.py
CHANGED
|
@@ -30,7 +30,10 @@ def new_account_list(
|
|
|
30
30
|
page: int = 1,
|
|
31
31
|
page_size: int = 20,
|
|
32
32
|
account_id: int = None, # 支持按户id搜索
|
|
33
|
-
account_status: int = 1
|
|
33
|
+
account_status: int = 1,
|
|
34
|
+
sort_seq: str = None,
|
|
35
|
+
sort_field: str = None,
|
|
36
|
+
platform_type: int = 1
|
|
34
37
|
):
|
|
35
38
|
"""
|
|
36
39
|
概览-账户 页面按照消耗降序排序的数据
|
|
@@ -60,8 +63,6 @@ def new_account_list(
|
|
|
60
63
|
data = {
|
|
61
64
|
"new_source": 1,
|
|
62
65
|
"user_id": user_id,
|
|
63
|
-
"sort_seq": "desc", # 降序排序,会自动过滤0数据
|
|
64
|
-
"sort_field": "cost", # 按照消耗排序
|
|
65
66
|
"page": page,
|
|
66
67
|
"page_size": page_size,
|
|
67
68
|
"need_sync": True,
|
|
@@ -81,12 +82,16 @@ def new_account_list(
|
|
|
81
82
|
"start_date_millons": lazytime.get_date2timestamp(date=start_date) * 1000, # 开始时间的时间戳
|
|
82
83
|
"end_date_millons": lazytime.get_date2timestamp(date=end_date) * 1000, # 结束时间的时间戳
|
|
83
84
|
"account_status": account_status,
|
|
84
|
-
"platform_type":
|
|
85
|
+
"platform_type": platform_type,
|
|
85
86
|
"use_top_sort": True,
|
|
86
87
|
"filter_empty_data": 0
|
|
87
88
|
}
|
|
88
89
|
if account_id:
|
|
89
90
|
data["account_id"] = [account_id]
|
|
91
|
+
if sort_seq:
|
|
92
|
+
data["sort_seq"] = sort_seq # desc:降序排序,会自动过滤0数据
|
|
93
|
+
if sort_field:
|
|
94
|
+
data["sort_field"] = sort_field # cost:按照消耗排序
|
|
90
95
|
return lazyrequests.lazy_requests(
|
|
91
96
|
method="POST",
|
|
92
97
|
url=url,
|
lazyad/open/qq.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import showlog
|
|
1
2
|
from lazysdk import lazyrequests
|
|
2
3
|
import random
|
|
3
4
|
import time
|
|
@@ -115,8 +116,10 @@ def oauth_token3(
|
|
|
115
116
|
def get_organization_account_relation(
|
|
116
117
|
access_token: str,
|
|
117
118
|
account_id=None,
|
|
119
|
+
cursor=None,
|
|
118
120
|
page: int = 1,
|
|
119
|
-
page_size: int = 100
|
|
121
|
+
page_size: int = 100,
|
|
122
|
+
pagination_mode: str = "PAGINATION_MODE_CURSOR"
|
|
120
123
|
):
|
|
121
124
|
"""
|
|
122
125
|
版本:3.0
|
|
@@ -125,8 +128,10 @@ def get_organization_account_relation(
|
|
|
125
128
|
https://developers.e.qq.com/v3.0/docs/api/organization_account_relation/get
|
|
126
129
|
:param access_token:
|
|
127
130
|
:param account_id:
|
|
131
|
+
:param cursor:
|
|
128
132
|
:param page:
|
|
129
133
|
:param page_size: 最小值 1,最大值 100
|
|
134
|
+
:param pagination_mode: 分页方式,注意,为PAGINATION_MODE_NORMAL时,不能获取大于1000条的记录
|
|
130
135
|
:return:
|
|
131
136
|
"""
|
|
132
137
|
url = 'https://api.e.qq.com/v3.0/organization_account_relation/get'
|
|
@@ -134,10 +139,17 @@ def get_organization_account_relation(
|
|
|
134
139
|
'access_token': access_token,
|
|
135
140
|
'timestamp': int(time.time()),
|
|
136
141
|
'nonce': make_nonce(),
|
|
137
|
-
"
|
|
138
|
-
"page_size": page_size
|
|
139
|
-
"pagination_mode": "PAGINATION_MODE_NORMAL"
|
|
142
|
+
"pagination_mode": pagination_mode,
|
|
143
|
+
"page_size": page_size
|
|
140
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
|
+
|
|
141
153
|
if account_id:
|
|
142
154
|
params["account_id"] = account_id
|
|
143
155
|
return lazyrequests.lazy_requests(
|
|
@@ -2,10 +2,10 @@ lazyad/__init__.py,sha256=tnVTFEgdzgMWQI0mZqy3DAueMJjpypPb15DdxJ-9TiU,41
|
|
|
2
2
|
lazyad/crawlers/__init__.py,sha256=GK3GGpiUJbESc1uGTwSmEnsSUwYDNZfJCxeLYB4CpS4,68
|
|
3
3
|
lazyad/crawlers/chuangliang.py,sha256=mVlfN5fipQdRc6STuC0B68ntGCU23I1PF2sD5q2jncg,1482
|
|
4
4
|
lazyad/crawlers/oceanengine.py,sha256=kjBEpCb_h5OpodCTqzvXd5MBBwAuw3Oq5UKWoTCXrQM,4540
|
|
5
|
-
lazyad/crawlers/qq.py,sha256=
|
|
5
|
+
lazyad/crawlers/qq.py,sha256=mAVOP1TOGVD1juu77uKBauN7vLymukTJ1mJ8uyRh9a8,3230
|
|
6
6
|
lazyad/open/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
lazyad/open/qq.py,sha256=
|
|
8
|
-
lazyad-0.0.
|
|
9
|
-
lazyad-0.0.
|
|
10
|
-
lazyad-0.0.
|
|
11
|
-
lazyad-0.0.
|
|
7
|
+
lazyad/open/qq.py,sha256=B6HWnBmtF3mbpwto1wqi7j-auK73Kzp8ESxeUpvLHRA,4391
|
|
8
|
+
lazyad-0.0.15.dist-info/METADATA,sha256=wpyECxUkGaYeBiVNvAeK3LHYusoeUpZ1tmA4q_NqjiA,1695
|
|
9
|
+
lazyad-0.0.15.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
10
|
+
lazyad-0.0.15.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
|
|
11
|
+
lazyad-0.0.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|