Skip to content

Commit 6a70a5b

Browse files
committed
fix: unstable rn of get_threads #83
1 parent a1e5f72 commit 6a70a5b

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

aiotieba/client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ async def get_threads(
669669
Args:
670670
fname_or_fid (str | int): 贴吧名或fid 优先贴吧名
671671
pn (int, optional): 页码. Defaults to 1.
672-
rn (int, optional): 请求的条目数. Defaults to 30.
672+
rn (int, optional): 请求的条目数. Defaults to 30. Max to 100.
673673
sort (int, optional): 排序方式 对于有热门分区的贴吧 0是热门排序 1是按发布时间 2报错 34都是热门排序 >=5是按回复时间
674674
对于无热门分区的贴吧 0是按回复时间 1是按发布时间 2报错 >=3是按回复时间. Defaults to 5.
675675
is_good (bool, optional): True则获取精品区帖子 False则获取普通区帖子. Defaults to False.

aiotieba/client/get_threads/_api.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ def pack_proto(core: TiebaCore, fname: str, pn: int, rn: int, sort: int, is_good
1313
req_proto.data.common._client_version = core.main_version
1414
req_proto.data.fname = fname
1515
req_proto.data.pn = pn
16-
req_proto.data.rn = rn if rn > 0 else 1
16+
req_proto.data.rn = 105
17+
req_proto.data.rn_need = rn if rn > 0 else 1
1718
req_proto.data.is_good = is_good
1819
req_proto.data.sort = sort
1920

aiotieba/client/get_threads/protobuf/FrsPageReqIdl.proto

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ message FrsPageReqIdl {
88
CommonReq common = 39;
99
string fname = 1;
1010
int32 rn = 2;
11+
int32 rn_need = 3;
1112
int32 is_good = 4;
1213
int32 cid = 5;
1314
int32 pn = 15;

aiotieba/client/get_threads/protobuf/FrsPageReqIdl_pb2.py

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)