Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lumina37 committed May 26, 2022
1 parent 842b725 commit c5c208f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 16 deletions.
2 changes: 0 additions & 2 deletions tiebaBrowser/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,6 @@ async def get_threads(self, fname: str, pn: int = 1, sort: int = 5, is_good: boo
data_proto.pn = pn
data_proto.rn = 30
data_proto.is_good = is_good
data_proto.q_type = 2
data_proto.sort_type = sort
req_proto = FrsPageReqIdl_pb2.FrsPageReqIdl()
req_proto.data.CopyFrom(data_proto)
Expand Down Expand Up @@ -819,7 +818,6 @@ async def get_posts(
data_proto.kz = tid
data_proto.pn = pn
data_proto.rn = rn if rn > 1 else 2
data_proto.q_type = 2
data_proto.r = sort
data_proto.lz = only_thread_author
data_proto.is_fold_comment_req = is_fold
Expand Down
4 changes: 2 additions & 2 deletions tiebaBrowser/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(self, _id: str | int | None = None, _raw_data: User_pb2.User | None
self.user_name = _id

def __repr__(self) -> str:
return f"{self.__class__.__name__} [user_id:{self._user_id} / user_name:{self.user_name} / portrait:{self._portrait} / nick_name:{self._nick_name}]"
return f"{self.__class__.__name__} [user_id:{self.user_id} / user_name:{self.user_name} / portrait:{self._portrait} / nick_name:{self._nick_name}]"

def __eq__(self, obj: "BasicUserInfo") -> bool:
return self.user_id == obj.user_id and self.user_name == obj.user_name and self._portrait == obj.portrait
Expand Down Expand Up @@ -403,7 +403,7 @@ def __repr__(self) -> str:
@property
def is_external(self) -> bool:
if self._is_external is None:
self._is_external = self._raw_data.link.startswith(self.external_perfix)
self._is_external = self.link.startswith(self.external_perfix)
return self._is_external


Expand Down
1 change: 0 additions & 1 deletion tiebaBrowser/tieba_proto/FrsPageReqIdl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ message FrsPageReqIdl {
int32 is_good = 4;
int32 cid = 5;
int32 with_group = 8;
int32 q_type = 14;
int32 pn = 15;
int32 sort_type = 47;
}
Expand Down
6 changes: 3 additions & 3 deletions tiebaBrowser/tieba_proto/FrsPageReqIdl_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tiebaBrowser/tieba_proto/PbPageReqIdl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ message PbPageReqIdl {
int32 with_floor = 8;
int32 floor_rn = 9;
int32 rn = 13;
int32 q_type = 17;
int32 pn = 18;
int32 floor_sort_type = 74;
int32 is_fold_comment_req = 78;
Expand Down
6 changes: 3 additions & 3 deletions tiebaBrowser/tieba_proto/PbPageReqIdl_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tiebaBrowser/tieba_proto/UserPostReqIdl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ message UserPostReqIdl {
uint32 is_thread = 4;
uint32 need_content = 5;
uint32 pn = 26;
int32 q_type = 32;
int32 is_view_card = 33;
CommonReq common = 27;
}
Expand Down
6 changes: 3 additions & 3 deletions tiebaBrowser/tieba_proto/UserPostReqIdl_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c5c208f

Please sign in to comment.