Showing preview only (1,245K chars total). Download the full file or copy to clipboard to get everything.
Repository: Starry-OvO/aiotieba
Branch: master
Commit: 2d39220dfce3
Files: 504
Total size: 1.1 MB
Directory structure:
gitextract_4rqd5pud/
├── .clang-format
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── discussion.md
│ │ └── feature_request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── CI-beta.yml
│ ├── CI.yml
│ ├── Pages.yml
│ └── Publish.yml
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
├── docs/
│ ├── CNAME
│ ├── css/
│ │ └── custom.css
│ ├── index.md
│ ├── ref/
│ │ ├── classdef/
│ │ │ ├── ats.md
│ │ │ ├── bawu_blacklist.md
│ │ │ ├── bawu_info.md
│ │ │ ├── bawu_perm.md
│ │ │ ├── bawu_postlogs.md
│ │ │ ├── bawu_userlogs.md
│ │ │ ├── blacklist.md
│ │ │ ├── blacklist_old.md
│ │ │ ├── blocks.md
│ │ │ ├── comments.md
│ │ │ ├── dislike_forums.md
│ │ │ ├── fans.md
│ │ │ ├── follow_forums.md
│ │ │ ├── follows.md
│ │ │ ├── forum_detail.md
│ │ │ ├── group_msg.md
│ │ │ ├── images.md
│ │ │ ├── last_replyers.md
│ │ │ ├── member_users.md
│ │ │ ├── posts.md
│ │ │ ├── profile.md
│ │ │ ├── rank_users.md
│ │ │ ├── recom_status.md
│ │ │ ├── recover_thread.md
│ │ │ ├── recovers.md
│ │ │ ├── replys.md
│ │ │ ├── searches.md
│ │ │ ├── self_follow_forums.md
│ │ │ ├── square_forums.md
│ │ │ ├── statistics.md
│ │ │ ├── threads.md
│ │ │ ├── unblock_appeals.md
│ │ │ ├── user_contents.md
│ │ │ └── user_info.md
│ │ ├── client.md
│ │ ├── config.md
│ │ ├── enums.md
│ │ └── exception.md
│ └── tutorial/
│ ├── async_start.md
│ ├── many_utils.md
│ └── start.md
├── mkdocs.yml
├── pyproject.toml
├── scripts/
│ └── proto_compile.py
├── src/
│ └── aiotieba/
│ ├── __init__.py
│ ├── __version__.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── _classdef/
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ ├── container.py
│ │ │ ├── contents.py
│ │ │ ├── user.py
│ │ │ └── vote.py
│ │ ├── _protobuf/
│ │ │ ├── Agree.proto
│ │ │ ├── Agree_pb2.py
│ │ │ ├── CommonReq.proto
│ │ │ ├── CommonReq_pb2.py
│ │ │ ├── Error.proto
│ │ │ ├── Error_pb2.py
│ │ │ ├── ForumList.proto
│ │ │ ├── ForumList_pb2.py
│ │ │ ├── FrsTabInfo.proto
│ │ │ ├── FrsTabInfo_pb2.py
│ │ │ ├── Lcm.proto
│ │ │ ├── Lcm_pb2.py
│ │ │ ├── Media.proto
│ │ │ ├── Media_pb2.py
│ │ │ ├── Page.proto
│ │ │ ├── Page_pb2.py
│ │ │ ├── PbContent.proto
│ │ │ ├── PbContent_pb2.py
│ │ │ ├── PollInfo.proto
│ │ │ ├── PollInfo_pb2.py
│ │ │ ├── Post.proto
│ │ │ ├── PostInfoList.proto
│ │ │ ├── PostInfoList_pb2.py
│ │ │ ├── Post_pb2.py
│ │ │ ├── Rpc.proto
│ │ │ ├── Rpc_pb2.py
│ │ │ ├── SimpleForum.proto
│ │ │ ├── SimpleForum_pb2.py
│ │ │ ├── SubPostList.proto
│ │ │ ├── SubPostList_pb2.py
│ │ │ ├── ThreadInfo.proto
│ │ │ ├── ThreadInfo_pb2.py
│ │ │ ├── User.proto
│ │ │ ├── User_pb2.py
│ │ │ ├── VideoInfo.proto
│ │ │ ├── VideoInfo_pb2.py
│ │ │ ├── Voice.proto
│ │ │ ├── Voice_pb2.py
│ │ │ └── __init__.py
│ │ ├── add_bawu/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── add_bawu_blacklist/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── add_blacklist_old/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── add_post/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── protobuf/
│ │ │ ├── AddPostReqIdl.proto
│ │ │ ├── AddPostReqIdl_pb2.py
│ │ │ ├── AddPostResIdl.proto
│ │ │ └── AddPostResIdl_pb2.py
│ │ ├── agree/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── block/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_bawu/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_bawu_blacklist/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_blacklist_old/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_post/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_posts/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_thread/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_threads/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── dislike_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── follow_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── follow_user/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── get_ats/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_bawu_blacklist/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_bawu_info/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetBawuInfoReqIdl.proto
│ │ │ ├── GetBawuInfoReqIdl_pb2.py
│ │ │ ├── GetBawuInfoResIdl.proto
│ │ │ └── GetBawuInfoResIdl_pb2.py
│ │ ├── get_bawu_perm/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_bawu_postlogs/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_bawu_userlogs/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_blacklist/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_blacklist_old/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── UserMuteQueryReqIdl.proto
│ │ │ ├── UserMuteQueryReqIdl_pb2.py
│ │ │ ├── UserMuteQueryResIdl.proto
│ │ │ └── UserMuteQueryResIdl_pb2.py
│ │ ├── get_blocks/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_cid/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── get_comments/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── PbFloorReqIdl.proto
│ │ │ ├── PbFloorReqIdl_pb2.py
│ │ │ ├── PbFloorResIdl.proto
│ │ │ └── PbFloorResIdl_pb2.py
│ │ ├── get_dislike_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetDislikeListReqIdl.proto
│ │ │ ├── GetDislikeListReqIdl_pb2.py
│ │ │ ├── GetDislikeListResIdl.proto
│ │ │ └── GetDislikeListResIdl_pb2.py
│ │ ├── get_fans/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_fid/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── get_follow_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_follows/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_forum/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_forum_detail/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetForumDetailReqIdl.proto
│ │ │ ├── GetForumDetailReqIdl_pb2.py
│ │ │ ├── GetForumDetailResIdl.proto
│ │ │ └── GetForumDetailResIdl_pb2.py
│ │ ├── get_forum_level/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetLevelInfoReqIdl.proto
│ │ │ ├── GetLevelInfoReqIdl_pb2.py
│ │ │ ├── GetLevelInfoResIdl.proto
│ │ │ └── GetLevelInfoResIdl_pb2.py
│ │ ├── get_group_msg/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetGroupMsgReqIdl.proto
│ │ │ ├── GetGroupMsgReqIdl_pb2.py
│ │ │ ├── GetGroupMsgResIdl.proto
│ │ │ └── GetGroupMsgResIdl_pb2.py
│ │ ├── get_images/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_last_replyers/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── FrsPageReqIdl4lp.proto
│ │ │ ├── FrsPageReqIdl4lp_pb2.py
│ │ │ ├── FrsPageResIdl4lp.proto
│ │ │ └── FrsPageResIdl4lp_pb2.py
│ │ ├── get_member_users/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_posts/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── PbPageReqIdl.proto
│ │ │ ├── PbPageReqIdl_pb2.py
│ │ │ ├── PbPageResIdl.proto
│ │ │ └── PbPageResIdl_pb2.py
│ │ ├── get_rank_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_rank_users/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_recom_status/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_recover_info/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_recovers/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_replys/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── ReplyMeReqIdl.proto
│ │ │ ├── ReplyMeReqIdl_pb2.py
│ │ │ ├── ReplyMeResIdl.proto
│ │ │ └── ReplyMeResIdl_pb2.py
│ │ ├── get_roomlist_by_fid/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_self_follow_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_self_follow_forums_v1/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_selfinfo_initNickname/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_selfinfo_moindex/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_square_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetForumSquareReqIdl.proto
│ │ │ ├── GetForumSquareReqIdl_pb2.py
│ │ │ ├── GetForumSquareResIdl.proto
│ │ │ └── GetForumSquareResIdl_pb2.py
│ │ ├── get_statistics/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_tab_map/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── SearchPostForumReqIdl.proto
│ │ │ ├── SearchPostForumReqIdl_pb2.py
│ │ │ ├── SearchPostForumResIdl.proto
│ │ │ └── SearchPostForumResIdl_pb2.py
│ │ ├── get_threads/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── FrsPageReqIdl.proto
│ │ │ ├── FrsPageReqIdl_pb2.py
│ │ │ ├── FrsPageResIdl.proto
│ │ │ └── FrsPageResIdl_pb2.py
│ │ ├── get_uinfo_getUserInfo_web/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_uinfo_getuserinfo_app/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetUserInfoReqIdl.proto
│ │ │ ├── GetUserInfoReqIdl_pb2.py
│ │ │ ├── GetUserInfoResIdl.proto
│ │ │ └── GetUserInfoResIdl_pb2.py
│ │ ├── get_uinfo_panel/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_uinfo_user_json/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_unblock_appeals/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_user_contents/
│ │ │ ├── __init__.py
│ │ │ ├── _classdef.py
│ │ │ ├── _const.py
│ │ │ ├── get_posts/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ ├── get_posts_form/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ ├── get_threads/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ └── protobuf/
│ │ │ ├── UserPostReqIdl.proto
│ │ │ ├── UserPostReqIdl_pb2.py
│ │ │ ├── UserPostResIdl.proto
│ │ │ └── UserPostResIdl_pb2.py
│ │ ├── get_user_forum_info/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── good/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── handle_unblock_appeals/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── init_websocket/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── UpdateClientInfoReqIdl.proto
│ │ │ ├── UpdateClientInfoReqIdl_pb2.py
│ │ │ ├── UpdateClientInfoResIdl.proto
│ │ │ └── UpdateClientInfoResIdl_pb2.py
│ │ ├── init_z_id/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── login/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── move/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── profile/
│ │ │ ├── __init__.py
│ │ │ ├── _classdef.py
│ │ │ ├── _const.py
│ │ │ ├── get_homepage/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ ├── get_uinfo_profile/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ └── protobuf/
│ │ │ ├── ProfileReqIdl.proto
│ │ │ ├── ProfileReqIdl_pb2.py
│ │ │ ├── ProfileResIdl.proto
│ │ │ └── ProfileResIdl_pb2.py
│ │ ├── push_notify/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── PushNotifyResIdl.proto
│ │ │ └── PushNotifyResIdl_pb2.py
│ │ ├── recommend/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── recover/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── remove_fan/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── search_exact/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── send_chatroom_msg/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── send_msg/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── protobuf/
│ │ │ ├── CommitPersonalMsgReqIdl.proto
│ │ │ ├── CommitPersonalMsgReqIdl_pb2.py
│ │ │ ├── CommitPersonalMsgResIdl.proto
│ │ │ └── CommitPersonalMsgResIdl_pb2.py
│ │ ├── set_bawu_perm/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── set_blacklist/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── protobuf/
│ │ │ ├── SetUserBlackReqIdl.proto
│ │ │ ├── SetUserBlackReqIdl_pb2.py
│ │ │ ├── SetUserBlackResIdl.proto
│ │ │ └── SetUserBlackResIdl_pb2.py
│ │ ├── set_msg_readed/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── protobuf/
│ │ │ ├── CommitReceivedPmsgReqIdl.proto
│ │ │ ├── CommitReceivedPmsgReqIdl_pb2.py
│ │ │ ├── CommitReceivedPmsgResIdl.proto
│ │ │ └── CommitReceivedPmsgResIdl_pb2.py
│ │ ├── set_nickname_old/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── set_profile/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── set_thread_privacy/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── sign_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── sign_forums/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── sign_growth/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── sync/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── tieba_uid2user_info/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetUserByTiebaUidReqIdl.proto
│ │ │ ├── GetUserByTiebaUidReqIdl_pb2.py
│ │ │ ├── GetUserByTiebaUidResIdl.proto
│ │ │ └── GetUserByTiebaUidResIdl_pb2.py
│ │ ├── top/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── unblock/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── undislike_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── unfollow_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── unfollow_user/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ └── ungood/
│ │ ├── __init__.py
│ │ └── _api.py
│ ├── client.py
│ ├── config.py
│ ├── const.py
│ ├── core/
│ │ ├── __init__.py
│ │ ├── account.py
│ │ ├── blcp.py
│ │ ├── http.py
│ │ ├── net.py
│ │ └── websocket.py
│ ├── enums.py
│ ├── exception.py
│ ├── helper/
│ │ ├── __init__.py
│ │ ├── cache.py
│ │ ├── crypto/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── __init__.py
│ │ │ ├── crypto.pyi
│ │ │ ├── include/
│ │ │ │ ├── base32/
│ │ │ │ │ └── base32.h
│ │ │ │ ├── crc/
│ │ │ │ │ └── crc32.h
│ │ │ │ ├── mbedtls/
│ │ │ │ │ ├── alignment.h
│ │ │ │ │ ├── common.h
│ │ │ │ │ ├── md5.h
│ │ │ │ │ ├── private_access.h
│ │ │ │ │ └── sha1.h
│ │ │ │ ├── rapidjson/
│ │ │ │ │ └── itoa.h
│ │ │ │ ├── tbcrypto/
│ │ │ │ │ ├── bb64.h
│ │ │ │ │ ├── const.h
│ │ │ │ │ ├── cuid.h
│ │ │ │ │ ├── error.h
│ │ │ │ │ ├── pywrap.h
│ │ │ │ │ ├── rc442.h
│ │ │ │ │ └── sign.h
│ │ │ │ └── xxHash/
│ │ │ │ └── xxhash.h
│ │ │ └── src/
│ │ │ ├── base32/
│ │ │ │ └── base32.c
│ │ │ ├── crc/
│ │ │ │ └── crc32.c
│ │ │ ├── mbedtls/
│ │ │ │ ├── md5.c
│ │ │ │ └── sha1.c
│ │ │ └── tbcrypto/
│ │ │ ├── bb64.c
│ │ │ ├── cuid.c
│ │ │ ├── lib.c
│ │ │ ├── rc442.c
│ │ │ └── sign.c
│ │ └── utils.py
│ ├── logging.py
│ └── typing.py
└── tests/
├── conftest.py
├── test_crypto.py
├── test_get_ats.py
├── test_get_blocks.py
├── test_get_comments.py
├── test_get_fans.py
├── test_get_follow_forums.py
├── test_get_follows.py
├── test_get_forum_detail.py
├── test_get_homepage.py
├── test_get_posts.py
├── test_get_recovers.py
├── test_get_threads.py
├── test_get_user_info.py
└── test_get_user_posts.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 120
---
Language: C
AccessModifierOffset: -4
IndentPPDirectives: AfterHash
IncludeBlocks: Preserve
================================================
FILE: .gitattributes
================================================
* text=auto eol=lf
*.py text eol=lf
*.pyi text eol=lf
*.pyx text eol=lf
*.pxd text eol=lf
*.h text eol=lf
*.c text eol=lf
*.cpp text eol=lf
*.hpp text eol=lf
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Bug报告
title: ''
labels: ''
assignees: ''
---
**简要描述这个bug**
...
**如何复现**
在何种场景下用何种操作复现
**你希望程序作出何种行为**
...
**截图(可选)**
...
================================================
FILE: .github/ISSUE_TEMPLATE/discussion.md
================================================
---
name: Discussion
about: 技术交流
title: ''
labels: ''
assignees: ''
---
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: 功能需求
title: ''
labels: ''
assignees: ''
---
**我需要什么功能**
...
**我想将这个功能应用于何种场景**
...
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
target-branch: "develop"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "develop"
schedule:
interval: "daily"
================================================
FILE: .github/workflows/CI-beta.yml
================================================
name: CI-beta
on:
workflow_dispatch:
jobs:
test-beta:
name: Test-beta
runs-on: ubuntu-latest
environment: develop
env:
PYTHON_VERSION: "3.15"
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: develop
- name: Setup UV
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: |
uv python pin ${{ env.PYTHON_VERSION }}
uv sync
- name: Run tests
env:
TB_BDUSS: ${{ secrets.BDUSS }}
TB_STOKEN: ${{ secrets.STOKEN }}
run: uv run pytest
================================================
FILE: .github/workflows/CI.yml
================================================
name: CI
on:
schedule:
- cron: "42 6 * * *"
push:
branches: [develop]
paths:
- "src/**"
- "tests/**"
- ".github/workflows/CI.yml"
pull_request:
branches: [develop]
paths:
- "src/**"
- "tests/**"
- ".github/workflows/CI.yml"
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
environment: develop
strategy:
matrix:
python-version: ["3.10", "3.14"]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: develop
- name: Setup UV
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: |
uv python pin ${{ matrix.python-version }}
uv sync
- name: Run tests
env:
TB_BDUSS: ${{ secrets.BDUSS }}
TB_STOKEN: ${{ secrets.STOKEN }}
run: uv run pytest
================================================
FILE: .github/workflows/Pages.yml
================================================
name: Pages
on:
push:
branches: [develop]
paths:
- "mkdocs.yml"
- "docs/**"
- "pyproject.toml"
- ".github/workflows/Pages*"
pull_request:
branches: [develop]
paths:
- "mkdocs.yml"
- "docs/**"
- "pyproject.toml"
- ".github/workflows/Pages*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: develop
- name: Setup UV
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv sync --only-group docs
- name: Build
run: uv run mkdocs build -d site
- name: Upload Artifact
uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
================================================
FILE: .github/workflows/Publish.yml
================================================
name: Publish
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest", "macos-15-intel"]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup UV
uses: astral-sh/setup-uv@v7
- name: Build wheels
uses: pypa/cibuildwheel@v3.4.1
- uses: actions/upload-artifact@v7
with:
name: artifact-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v7
with:
name: artifact-source
path: ./dist/*.tar.gz
publish:
name: Publish
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v7
with:
name: artifact
pattern: artifact-*
delete-merged: true
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: artifact
path: dist
- name: Publish to PyPI
if: ${{ github.event_name == 'push' }}
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish to TestPyPI
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
================================================
FILE: .gitignore
================================================
.*/
!.github/
*_cache/
*.py[cd]
__pycache__
log/
dist/
*build*/
.python-version
*.lock
/*.py
account.toml
database.toml
update.md
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
if (NOT SKBUILD_PROJECT_NAME)
set(SKBUILD_PROJECT_NAME "aiotieba")
endif ()
if (NOT SKBUILD_PROJECT_VERSION)
set(SKBUILD_PROJECT_VERSION 0)
endif ()
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION})
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
add_subdirectory(src/${SKBUILD_PROJECT_NAME}/helper/crypto)
================================================
FILE: LICENSE
================================================
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>
================================================
FILE: README.md
================================================
<p align="center">
<a href="https://socialify.git.ci">
<img src="https://user-images.githubusercontent.com/48282276/217530379-1348f7c5-7056-48f4-8c64-1c74caf5497c.svg">
</a>
</p>
<div align="center">
<p>
<a href="https://github.com/lumina37/aiotieba/actions">
<img src="https://img.shields.io/github/actions/workflow/status/lumina37/aiotieba/CI.yml?branch=develop&label=CI&logo=github&style=flat-square" alt="GitHub Workflow Status">
</a>
<a href="https://pypi.org/project/aiotieba">
<img src="https://img.shields.io/pypi/v/aiotieba?color=g&style=flat-square" alt="PyPI - Version">
</a>
<a href="https://pypi.org/project/aiotieba">
<img src="https://img.shields.io/pypi/pyversions/aiotieba?style=flat-square" alt="PyPI - Python Version">
</a>
</p>
</div>
---
## 安装
```shell
pip install aiotieba
```
## 尝试一下
```python
import asyncio
import aiotieba
async def main():
async with aiotieba.Client() as client:
threads = await client.get_threads("天堂鸡汤")
for thread in threads[3:6]:
print(f"tid={thread.tid}\ntext={thread.text}")
asyncio.run(main())
```
*输出样例*
```log
tid=8537603600
text=一人发一句最喜欢的游戏台词
楼主先来
很喜欢lol布隆说的“夜晚越黑暗,星星就越明亮”,尤其在当下这个有着诸多缺点的世界里,这句话让我感觉舒服了很多。
在人们已不再相信理想主义的至暗时刻,高擎炬火之人便显得更加重要,至少我会坚持我的理想
tid=8093410706
text=大概是剪切板里的一些有意思的话
今天看自己的剪切板快满了,稍微翻翻突然发现以前存的一些话还挺有意思,就放在这里啦
(咦,疑似水帖啊我)
tid=8537699088
text=记录一下自己人生第一次当“老师”的经历^_^
明天我带的孩子们就“毕业”了,第一次当老师我改变了很多也收获了很多,就想着给自己记录一下这段宝贵的经历:-)
```
继续阅读[**入门教程**](https://aiotieba.cc/tutorial/start)
## 项目特色
+ 收录[**数十个常用API**](https://github.com/lumina37/aiotieba/tree/develop/aiotieba/api)
+ 类型注解全覆盖,方法注释全覆盖,内部命名统一
+ 支持protobuf序列化请求参数
+ 支持websocket接口
+ 与官方版本高度一致的密码学实现
## 友情链接
+ [带UI的吧务管理器 (dog194/TiebaManager)](https://github.com/dog194/TiebaManager)
+ [VSCode贴吧摸鱼插件 (akacaijizhou/tieba-fish)](https://github.com/akacaijizhou/tieba-fish)
+ [eztb贴吧工具箱 (Dilettante258/eazy-tieba)](https://www.eztb.org)
+ [功能全面的贴吧管理QQ bot (TiebaMeow/TiebaManageBot)](https://github.com/TiebaMeow/TiebaManageBot)
+ [易于部署和使用的 Web 贴吧管理和自动化平台 (TiebaMeow/WebTiebaManager)](https://github.com/TiebaMeow/WebTiebaManager)
+ [灵活且高可靠的贴吧爬虫 (TiebaMeow/TiebaScraper)](https://github.com/TiebaMeow/TiebaScraper)
+ [TiebaLite 第三方安卓客户端 (zzc10086/TiebaLite)](https://github.com/zzc10086/TiebaLite)
+ [C#版本的贴吧接口库 (BaWuZhuShou/AioTieba4DotNet)](https://github.com/BaWuZhuShou/AioTieba4DotNet)
+ [基于aiotieba的tieba bot (adk23333/BungleCat)](https://github.com/adk23333/BungleCat)
+ [基于aiotieba的贴吧管理器 (adk23333/tieba-admin)](https://github.com/adk23333/tieba-admin)
+ [贴吧protobuf定义文件合集 更新至12.51 (n0099/tbclient.protobuf)](https://github.com/n0099/tbclient.protobuf)
## 特别鸣谢
<p align="center">
<a href="https://jb.gg/OpenSourceSupport">
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg">
</a>
</p>
为本开源项目提供的免费产品授权
================================================
FILE: docs/CNAME
================================================
aiotieba.cc
================================================
FILE: docs/css/custom.css
================================================
[data-md-color-scheme=slate] {
--md-hue: 210;
--md-default-bg-color: hsla(var(--md-hue), 15%, 10%, 1);
--md-typeset-a-color: hsla(var(--md-hue), 75%, 50%, 1);
}
================================================
FILE: docs/index.md
================================================
#
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/48282276/217530379-1348f7c5-7056-48f4-8c64-1c74caf5497c.svg">
<source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/48282276/217530385-98a2fb24-ff6e-4b27-990f-998b66c2ab5e.svg">
<img src="https://user-images.githubusercontent.com/48282276/217530385-98a2fb24-ff6e-4b27-990f-998b66c2ab5e.svg">
</picture>
</p>
<p align="center">
<a href="https://github.com/lumina37/aiotieba/actions">
<img src="https://img.shields.io/github/actions/workflow/status/lumina37/aiotieba/CI.yml?branch=develop&label=CI&logo=github&style=flat-square" alt="GitHub Workflow Status">
</a>
<a href="https://pypi.org/project/aiotieba">
<img src="https://img.shields.io/pypi/v/aiotieba?color=g&style=flat-square" alt="PyPI - Version">
</a>
<a href="https://pypi.org/project/aiotieba">
<img src="https://img.shields.io/pypi/pyversions/aiotieba?style=flat-square" alt="PyPI - Python Version">
</a>
</p>
---
## 安装
```shell
pip install aiotieba
```
## 尝试一下
```python
import asyncio
import aiotieba
async def main():
async with aiotieba.Client() as client:
threads = await client.get_threads("天堂鸡汤")
for thread in threads[3:6]:
print(f"tid={thread.tid} text={thread.text}")
asyncio.run(main())
```
*输出样例*
```log
tid=8537603600 text=一人发一句最喜欢的游戏台词
楼主先来
很喜欢lol布隆说的“夜晚越黑暗,星星就越明亮”,尤其在当下这个有着诸多缺点的世界里,这句话让我感觉舒服了很多在人们已不再相信理想主义的至暗时刻,高擎炬火之人便显得更加重要,至少我会坚持我的理想
---
tid=8093410706 text=大概是剪切板里的一些有意思的话
今天看自己的剪切板快满了,稍微翻翻突然发现以前存的一些话还挺有意思,就放在这里啦
(咦,疑似水帖啊我)
---
tid=8537699088 text=记录一下自己人生第一次当“老师”的经历^_^
明天我带的孩子们就“毕业”了,第一次当老师我改变了很多也收获了很多,就想着给自己记录一下这段宝贵的经历:-)
```
继续阅读[**入门教程**](https://aiotieba.cc/tutorial/start)
## 项目特色
+ 收录[**数十个常用API**](https://github.com/lumina37/aiotieba/tree/develop/aiotieba/api)
+ 类型注解全覆盖,方法注释全覆盖,类属性注释全覆盖,内部命名统一
+ 请求参数支持protobuf序列化
+ 支持websocket接口
+ 高一致性的密码学实现
================================================
FILE: docs/ref/classdef/ats.md
================================================
::: aiotieba.api.get_ats._classdef
================================================
FILE: docs/ref/classdef/bawu_blacklist.md
================================================
::: aiotieba.api.get_bawu_blacklist._classdef
================================================
FILE: docs/ref/classdef/bawu_info.md
================================================
::: aiotieba.api.get_bawu_info._classdef
================================================
FILE: docs/ref/classdef/bawu_perm.md
================================================
::: aiotieba.api.get_bawu_perm._classdef
================================================
FILE: docs/ref/classdef/bawu_postlogs.md
================================================
::: aiotieba.api.get_bawu_postlogs._classdef
================================================
FILE: docs/ref/classdef/bawu_userlogs.md
================================================
::: aiotieba.api.get_bawu_userlogs._classdef
================================================
FILE: docs/ref/classdef/blacklist.md
================================================
::: aiotieba.api.get_blacklist._classdef
================================================
FILE: docs/ref/classdef/blacklist_old.md
================================================
::: aiotieba.api.get_blacklist_old._classdef
================================================
FILE: docs/ref/classdef/blocks.md
================================================
::: aiotieba.api.get_blocks._classdef
================================================
FILE: docs/ref/classdef/comments.md
================================================
::: aiotieba.api.get_comments._classdef
================================================
FILE: docs/ref/classdef/dislike_forums.md
================================================
::: aiotieba.api.get_dislike_forums._classdef
================================================
FILE: docs/ref/classdef/fans.md
================================================
::: aiotieba.api.get_fans._classdef
================================================
FILE: docs/ref/classdef/follow_forums.md
================================================
::: aiotieba.api.get_follow_forums._classdef
================================================
FILE: docs/ref/classdef/follows.md
================================================
::: aiotieba.api.get_follows._classdef
================================================
FILE: docs/ref/classdef/forum_detail.md
================================================
::: aiotieba.api.get_forum_detail._classdef
================================================
FILE: docs/ref/classdef/group_msg.md
================================================
::: aiotieba.api.get_group_msg._classdef
================================================
FILE: docs/ref/classdef/images.md
================================================
::: aiotieba.api.get_images._classdef
================================================
FILE: docs/ref/classdef/last_replyers.md
================================================
::: aiotieba.api.get_last_replyers._classdef
================================================
FILE: docs/ref/classdef/member_users.md
================================================
::: aiotieba.api.get_member_users._classdef
================================================
FILE: docs/ref/classdef/posts.md
================================================
::: aiotieba.api.get_posts._classdef
================================================
FILE: docs/ref/classdef/profile.md
================================================
::: aiotieba.api.profile._classdef
================================================
FILE: docs/ref/classdef/rank_users.md
================================================
::: aiotieba.api.get_rank_users._classdef
================================================
FILE: docs/ref/classdef/recom_status.md
================================================
::: aiotieba.api.get_recom_status._classdef
================================================
FILE: docs/ref/classdef/recover_thread.md
================================================
::: aiotieba.api.get_recover_info._classdef
================================================
FILE: docs/ref/classdef/recovers.md
================================================
::: aiotieba.api.get_recovers._classdef
================================================
FILE: docs/ref/classdef/replys.md
================================================
::: aiotieba.api.get_replys._classdef
================================================
FILE: docs/ref/classdef/searches.md
================================================
::: aiotieba.api.search_exact._classdef
================================================
FILE: docs/ref/classdef/self_follow_forums.md
================================================
::: aiotieba.api.get_self_follow_forums._classdef
================================================
FILE: docs/ref/classdef/square_forums.md
================================================
::: aiotieba.api.get_square_forums._classdef
================================================
FILE: docs/ref/classdef/statistics.md
================================================
::: aiotieba.api.get_statistics._classdef
================================================
FILE: docs/ref/classdef/threads.md
================================================
::: aiotieba.api.get_threads._classdef
================================================
FILE: docs/ref/classdef/unblock_appeals.md
================================================
::: aiotieba.api.get_unblock_appeals._classdef
================================================
FILE: docs/ref/classdef/user_contents.md
================================================
::: aiotieba.api.get_user_contents._classdef
================================================
FILE: docs/ref/classdef/user_info.md
================================================
::: aiotieba.api.tieba_uid2user_info._classdef
::: aiotieba.api.get_uinfo_getuserinfo_app._classdef
::: aiotieba.api.get_uinfo_getUserInfo_web._classdef
::: aiotieba.api.get_uinfo_user_json._classdef
::: aiotieba.api.get_uinfo_panel._classdef
================================================
FILE: docs/ref/client.md
================================================
# 客户端
## 如何使用
`aiotieba.Client`是aiotieba的核心入口点 (Entry Point),其中封装了大量操作百度贴吧核心API的简便方法,你可以把它理解成一个“客户端”
我们推荐通过异步上下文管理器来使用`Client`,例如:
```python
async with aiotieba.Client() as client:
...
```
## Client
::: aiotieba.Client
================================================
FILE: docs/ref/config.md
================================================
# 超时配置
::: aiotieba.config
================================================
FILE: docs/ref/enums.md
================================================
# 枚举
::: aiotieba.enums
================================================
FILE: docs/ref/exception.md
================================================
# 异常处理
::: aiotieba.exception
================================================
FILE: docs/tutorial/async_start.md
================================================
# 异步编程入门教程
## 样例代码
本样例将获取并打印吧主题帖列表
```python
import asyncio
import aiotieba as tb
# [2] 异步函数——`async`关键字
async def main():
# [6] `async with`是什么?
async with tb.Client() as client:
# [1] CPU在何时离开?——`await`关键字
threads = await client.get_threads("天堂鸡汤")
print(threads)
# [4] CPU在何时返回?——事件循环
# 官方文档:运行asyncio程序
# https://docs.python.org/zh-cn/3/library/asyncio-task.html#running-an-asyncio-program
asyncio.run(main())
```
## 样例解析
### 什么是异步
在计算机中,CPU的速度普遍要比网络IO的速度快几个数量级。为了不让网络IO成为系统性能的瓶颈,我们会希望CPU等高速设备不要原地等待网卡慢悠悠地传输数据,而是可以把IO缓冲区交给网卡芯片就立刻离开,暂时转去执行一些其他任务,这其中就体现了**异步**(Asynchronous)的思想。
*Asynchronous*的前缀*a-*意为*not*,*syn*意为*together*,*chrono*源自古希腊语*khronos*,意为*time*,*-ous*为形容词后缀,合起来就是*not-together-time*,不同时发生的。在计算机领域,*Asynchronous*常常用于形容“多个事件不在同一时间发生”。这里的“同一时间”所强调的并不是时间长短,而是**逻辑上的连贯性**。
应用了异步技术后,在网络请求发出后到网络响应到来前的这段时间,CPU可以暂时离开,切换到其他地方去处理另外的工作。这种逻辑切换使得网络IO的请求事件与响应事件,相对于CPU及其他相关的高速设备而言,不在同一个**时间**发生。*Asynchronous*的词源与其术语含义高度匹配,值得反复品读。
### CPU在何时离开?——`await`关键字
那么Python是如何实现异步的?在抛出一大堆错综复杂的概念来回答这个问题之前,你可以先带着一个更小的子问题来阅读下面的文章——CPU在何时离开?让我们先来看样例。
在样例`threads = await client.get_threads()`中,`client.get_threads`是一个**异步函数**。它和同步函数类似,都是可调对象(Callable)。`client.get_threads()`调用(call)了这个异步函数,调用异步函数不会像调用同步函数那样返回结果,而是会返回一个“施工方案”,也就是**可等待对象**(`Awaitable`)。此时,在可等待对象`client.get_threads()`的左边,那个至关重要的关键字`await`出现了。
*await*意为“等待”,往往用于表达“以被动的姿态等待某事的发生”,且暗含期待之意。在`threads = await client.get_threads()`中,`await`执行`client.get_threads()`返回的施工方案,并要求上一级执行过程`await main()`必须等待`client.get_threads()`给出执行结果`threads`后,再继续施工。
可能有初学者会迷惑于一个点,`client.get_threads()`会在何时执行?在创建时,还是在受到`await`调度时?下面这个简单的例子可以解答你的疑惑。
```python
import asyncio
async def foo():
print("1 - foo_coro is executing")
async def main():
foo_coro = foo()
print("0 - foo_coro has not been executed!!!")
await foo_coro
asyncio.run(main())
```
输出结果
```log
0 - foo_coro has not been executed!!!
1 - foo_coro is executing
```
这说明`foo_coro`并不会在创建时立即执行,施工流程的创建(`foo_coro = foo()`)和执行(`await foo_coro`)是可以分开的。
`main()`的等待行为对应于一个计算机术语**“挂起”**(suspend),后面我们都会使用这个术语来替代“暂停”等口语化的词汇。*suspend*与*pause*意思相近,但他们之间有着微妙的区别——*suspend*往往表示较长时间的暂停,譬如在快节奏游戏中的暂停我们通常会说*pause*而不是*suspend*。
思考一个问题,在`await`关键字的指挥下做出等待行为的是谁?正确答案是`main()`的执行过程,而不是`main()`或者`main`,更不应该是`client.get_threads()`或者CPU。这一套概念辨析可不是什么无用的八股,它特别有助于加深我们对Python异步的理解。施工方案`main()`只是一个可等待对象(`Awaitable`),同样的,`main`也只是一个可调对象(`Callable`)。对象可没有“等待”、“暂停”的说法——“暂停一个对象”?你应该会觉得这句话十分诡异。只有施工方案的执行过程,也就是`main()`的执行过程可以有“暂停施工”、“等待某个任务完成再继续施工”的说法。
在这一小节的最后,我相信各位读者已经能够从具体到抽象,自行总结出`await`的含义——Python中`await`关键字的作用就是执行右侧的可等待对象,并让其当前所处的执行流程挂起以等待右侧的可等待对象给出结果。在本节开头提出的问题也可以解答了,在利用`await`等待一个可等待对象时,如果不能立即获得结果,CPU就会离开。
### 异步函数——`async`关键字
在Python中,`async`关键字被用于将函数标记为异步的。不论函数体内是否需要等待(`await`),添加了`async`标记的函数都会返回一个可等待对象。
### 什么是协程
**协程**(`Coroutine`)就是可以在中途挂起和恢复执行的函数流程。调用异步函数`main`所得到的可等待对象`main()`就是一个协程。
### CPU在何时返回?——事件循环
回调函数(callback function)是这样一种函数:客户需要到柜台取货,但他又不想一直在柜台干等,就把自己的电话号码(回调函数)交给柜台,让柜台在有货之后打电话(执行回调函数)通知他来取。
**事件循环**(`EventLoop`),其中*event*意为事件,*loop*意为循环,就是用来获取事件通知,调度协程执行的循环体。事件循环在每次循环中都会做以下工作:将新增的定时任务添加到优先级队列;将已到执行时间的定时任务的回调函数添加到待执行回调函数列表;从操作系统获取事件通知(比如网卡通过硬件中断通知系统:某个socket有数据到来)并将读/写缓冲区的回调函数添加到待执行列表;最后,执行所有待执行的回调函数。CPU会在“执行回调函数”这一步骤返回先前被挂起的正在等待IO事件的协程,恢复他们的执行。
`asyncio.run`将会使用一个全局事件循环(不存在则新建)来执行作为参数的协程。`asyncio.run(main())`也就是在全局事件循环中执行协程`main()`。从`main()`到`client.get_threads()`一路往下执行,最终抵达一个底层协程,它将一个用于网络通信的socket注册到操作系统内核,然后立即返回一个`Future`对象,表示一个将要到来的结果,由于我们`await`了这个`Future`,调用链上所有的协程都被挂起,直到事件循环从操作系统获取到一个匹配的可读事件后,事件循环再执行对应读缓冲区的回调函数将协程唤醒并继续执行。
### 为什么`await`只能在异步函数中使用?
协程有多种实现方式,而Python实现的是一种沿用了生成器机制的无栈协程。沿用生成器机制,意味着协程的上下文和生成器一样,被保存在一个对象中;无栈,意味着Python协程的调用链并不是一个栈结构,而是一个酷似链表的结构,最开始被调用的协程为链表头,通过其保存的上下文一路指向最底层的协程。而与无栈协程相对的有栈协程则与线程十分类似,不论同步函数的调用还是异步函数的调用都共享一套调用栈,因此有栈协程可以像线程一样在任何位置挂起,而无栈协程只能在特定位置(如`await`关键字标记的地方)挂起。无栈协程的一大“丑陋”之处就是`await`只能在异步函数中使用,JavaScript/Rust/C++的无栈协程都是如此,这导致如果你要使用异步特性,就必须将`async def`铺满整个调用链。
现在我们来回答标题提出的问题,如果在同步函数的调用过程中使用了`await`来等待异步结果,由于调用同步函数的返回值不是协程,不会在其中保存上下文信息,这导致我们无法在同步函数中找到那个应该恢复执行的正确位置。但如果我就是要在同步函数中记录应当恢复执行的正确位置呢?很好,那么你将实现一个有栈协程,go语言正是如此。
### `async with`是什么?
也就是一个异步版本的上下文生成器,在使用`__init__`初始化对象之后使用对象的异步方法`__aenter__`进行异步初始化工作(比如创建连接池),使用异步方法`__aexit__`进行异步清理工作(比如关闭所有连接)。
================================================
FILE: docs/tutorial/many_utils.md
================================================
# 实用工具
## 签到
```python
from __future__ import annotations
import asyncio
import aiotieba as tb
async def sign(BDUSS_key: str, *, retry_times: int = 0):
"""
各种签到
Args:
BDUSS (str): 用于创建客户端
retry_times (int, optional): 重试次数. Defaults to 0.
"""
async with tb.Client(BDUSS_key) as client:
# 成长等级签到
for _ in range(retry_times):
await asyncio.sleep(1.0)
if await client.sign_growth():
break
# 签到
await client.sign_forums() # 先一键签到
retry_list: list[str] = []
for pn in range(1, 9999):
forums = await client.get_self_follow_forums(pn)
retry_list += [forum.fname for forum in forums if not forum.is_signed]
if not forums.has_more:
break
for _ in range(retry_times + 1):
new_retry_list: list[str] = []
for fname in retry_list:
ret = await client.sign_forum(fname)
if ret.err is not None and ret.err.code not in [160002, 340006]:
new_retry_list.append(fname)
await asyncio.sleep(1.0)
if not new_retry_list:
break
retry_list = new_retry_list
async def main():
await sign("在此处输入待签到账号的BDUSS", retry_times=3)
await sign("在此处输入另一个待签到账号的BDUSS", retry_times=3)
asyncio.run(main())
```
## 批量封禁
```python
import asyncio
import aiotieba as tb
async def main():
async with tb.Client("在此处输入你的BDUSS") as client:
for uid in [
1111,
2222,
3333,
]:
await client.block("xxx", uid, day=10)
asyncio.run(main())
```
## 将个人主页的帖子全部设为隐藏
```python
import asyncio
import aiotieba as tb
async def main():
async with tb.Client("在此处输入你的BDUSS") as client:
# 海象运算符(:=)会在创建threads变量并赋值的同时返回该值,方便while语句检查其是否为空
# 更多信息请搜索“Python海象运算符”
while threads := await client.get_user_threads():
await asyncio.gather(*[client.set_thread_private(thread.fid, thread.tid, thread.pid) for thread in threads])
asyncio.run(main())
```
## 屏蔽贴吧,使它们不再出现在你的首页推荐里
```python
import asyncio
import aiotieba as tb
async def main():
async with tb.Client("在此处输入你的BDUSS") as client:
await asyncio.gather(*[
client.dislike_forum(fname)
for fname in [
"贴吧名A",
"贴吧名B",
"贴吧名C",
] # 把你要屏蔽的贴吧名填在这个列表里
])
asyncio.run(main())
```
## 解除多个贴吧的屏蔽状态
```python
import asyncio
import aiotieba as tb
async def main():
async with tb.Client("在此处输入你的BDUSS") as client:
# 此列表用于设置例外
# 将你希望依然保持屏蔽的贴吧名填在这个列表里
preserve_fnames = [
"保持屏蔽的贴吧名A",
"保持屏蔽的贴吧名B",
"保持屏蔽的贴吧名C",
]
while 1:
forums = await client.get_dislike_forums()
await asyncio.gather(*[
client.undislike_forum(forum.fid) for forum in forums if forum.fname not in preserve_fnames
])
if not forums.has_more:
break
asyncio.run(main())
```
## 清除旧版乱码昵称
```python
import asyncio
import aiotieba as tb
async def main():
async with tb.Client("在此处输入你的BDUSS") as client:
user = await client.get_self_info(tb.ReqUInfo.USER_NAME)
await client.set_nickname_old(user.user_name)
asyncio.run(main())
```
## 清空粉丝列表(无法复原的危险操作,请谨慎使用!)
```python
import asyncio
import aiotieba as tb
async def main():
async with tb.Client("在此处输入你的BDUSS") as client:
while fans := await client.get_fans():
await asyncio.gather(*[client.remove_fan(fan.user_id) for fan in fans])
asyncio.run(main())
```
## 清除所有历史回复(无法复原的危险操作,请谨慎使用!)
```python
import asyncio
import aiotieba as tb
async def main():
async with tb.Client("在此处输入你的BDUSS") as client:
while posts_list := await client.get_user_posts():
await asyncio.gather(*[
client.del_post(post.fid, post.tid, post.pid) for posts in posts_list for post in posts
])
asyncio.run(main())
```
================================================
FILE: docs/tutorial/start.md
================================================
# 入门教程
阅读本教程,你至少需要对Python的 **上下文管理器** `with...as...` 和 **迭代器** `for...in...` 有基本的印象,因为本文不会对这些重要的基本概念做过于深入的解释
推荐在本地新建一个`.py`文件来运行样例
## 命名约定
贴吧服务端使用以下名称表示特定的数据
### BDUSS
贴吧服务端使用BDUSS来确认用户身份
BDUSS是一串由纯ascii字符组成的,长度为192的字符串
!!! warning
使用BDUSS可以完成**一切**不需要手机/邮箱验证码的操作,包括**发帖**/**发私信**/**获取账号上的所有历史发言**
BDUSS的过期时间长达数年,一般只能通过退出登录或修改密码使其失效
因此将BDUSS泄露给不受信任的人可能导致长期的账号安全风险和隐私泄露风险
在浏览器的Cookie和各种表单参数中你都能看到它的身影
搜索 你的浏览器型号+如何查看网站的Cookie 就能知道如何获取你的贴吧账号的BDUSS了
以Chrome为例,在任何一个贴吧网页下按<kbd>F12</kbd>调出开发者选项,然后你就能在下图的位置找到它

### user_name
用户名
user_name唯一,但可变,且可以是空值
请注意与nick_name相区分
### portrait
头像ID
每个贴吧用户都有且仅有一个portrait
portrait是一串由纯ascii字符组成的,以tb.1.作为开头的,长度为33~36的字符串(仅有一些远古时期的ip账号不符合这个规则)
譬如我的portrait就是tb.1.8277e641.gUE2cTq4A4z5fi2EHn5k3Q
你可以通过portrait获取用户头像,例如[我的头像](http://tb.himg.baidu.com/sys/portraith/item/tb.1.8277e641.gUE2cTq4A4z5fi2EHn5k3Q)
### user_id
用户ID
user_id唯一,不可变,不能为空
请注意将其与用户个人主页的tieba_uid相区分
user_id是一个uint64值(仅有一些远古时期的ip账号不符合这个规则)
user_name portrait user_id 都是满足唯一性的用户标识符,并可以通过其中任意一个的值反查其余两个
### tieba_uid
用户个人主页ID
tieba_uid唯一,不可变,但可以为空
请注意将其与用户的user_id相区分
tieba_uid是一个uint64值
可以通过tieba_uid的值反查user_name portrait user_id
### forum_id
吧ID,简称fid
每个贴吧都有且仅有一个fid
### thread_id
主题帖ID,简称tid
每个主题帖都有且仅有一个tid
### post_id
回复ID,简称pid
每个楼层、楼中楼都有且仅有一个pid
## 关于异步编程
如果你不了解Python异步编程,请先阅读[异步编程入门教程](async_start.md)
## 迈出第一步
一个非常简单的入门案例
### 样例代码
本样例将获取并打印当前账号的用户信息
```python
import asyncio
import aiotieba as tb
BDUSS = "在这里输入你账号的BDUSS"
async def main():
async with tb.Client(BDUSS) as client:
user = await client.get_self_info()
print(user)
asyncio.run(main())
```
### 期望结果
如果你的[`BDUSS`](#bduss)填写无误,你会获得类似下面这样的结果
```log
AAAA(你的用户名)
```
## 内容的层次结构
本样例将协助你理解“主题帖-回复-楼中楼”的三级层次结构,以及如何解析富媒体内容
### 样例代码
本样例将逐级获取并打印“主题帖-回复-楼中楼”中各层级的部分内容
```python
import asyncio
import aiotieba as tb
async def main():
async with tb.Client() as client:
threads = await client.get_threads("天堂鸡汤")
for thread in threads[3:6]:
print(thread) # 打印整个主题帖
print(thread.contents) # 打印主题帖中的内容碎片(含富媒体信息)
print(thread.contents.emojis) # 仅打印表情相关的内容碎片
selected_thread = threads[4]
posts = await client.get_posts(selected_thread.tid)
for post in posts[3:6]:
print(post) # 打印整个回复
print(post.contents) # 打印回复中的内容碎片
print(post.contents.imgs) # 仅打印图片相关的内容碎片
for post in posts:
if post.reply_num == 0:
continue
comments = await client.get_comments(post.tid, post.pid)
for comment in comments:
print(comment) # 打印整个楼中楼
print(comment.contents.ats) # 仅打印@相关的内容碎片
break
asyncio.run(main())
```
## 运行时更改BDUSS
该案例演示了如何在运行时更改BDUSS
建议为每个账号新建`Client`,以避免误用遗留的websocket连接
同样地,你也可以直接向`Client.account`赋值以动态变更用户参数
### 样例代码
本样例将获取并打印当前账号的用户信息
```python
import asyncio
import aiotieba as tb
async def main():
async with tb.Client() as client:
client.account.BDUSS = "在这里输入你账号的BDUSS"
user = await client.get_self_info()
print(user)
asyncio.run(main())
```
### 期望结果
如果你的[`BDUSS`](#bduss)填写无误,你会获得类似下面这样的结果
```log
AAAA(你的用户名)
```
## 多账号
如何同时使用多个账号?
### 样例代码
本样例将获取并打印多个账号的用户信息
```python
import asyncio
import aiotieba as tb
BDUSS1 = "在这里输入第一个账号的BDUSS"
BDUSS2 = "在这里输入第二个账号的BDUSS"
async def main():
async with tb.Client(BDUSS1) as client1, tb.Client(BDUSS2) as client2:
user1 = await client1.get_self_info()
user2 = await client2.get_self_info()
print(f"账号1: {user1}, 账号2: {user2}")
asyncio.run(main())
```
### 期望结果
如果你的[`BDUSS`](#bduss)填写无误,你会获得类似下面这样的结果
```log
账号1: AAAA, 账号2: BBBB
```
## Account的序列化与反序列化
该功能可以用于导出账号参数
### 样例代码
本样例将演示账号参数的导出与导入,并使用导入生成的Account获取用户信息
```python
import asyncio
import aiotieba as tb
BDUSS = "在这里输入你账号的BDUSS"
async def main():
account1 = tb.Account(BDUSS)
dic = account1.to_dict()
print(dic)
account2 = tb.Account.from_dict(dic)
assert account1.BDUSS == account2.BDUSS
async with tb.Client(account=account2) as client:
user = await client.get_self_info()
print(user)
asyncio.run(main())
```
### 期望结果
如果你的[`BDUSS`](#bduss)填写无误,你会获得类似下面这样的结果
```log
{'BDUSS': '...'}
AAAA(你的用户名)
```
## 简单并发爬虫
### 样例代码
本样例将同时请求用户个人信息和天堂鸡汤吧首页前30帖,并将他们打印出来
```python
import asyncio
import aiotieba as tb
BDUSS = "在这里输入你账号的BDUSS"
async def main():
async with tb.Client(BDUSS) as client:
# [1] 什么是`asyncio.gather`?
# 参考官方文档:并发运行任务
# https://docs.python.org/zh-cn/3/library/asyncio-task.html#running-tasks-concurrently
user, threads = await asyncio.gather(client.get_self_info(), client.get_threads("天堂鸡汤"))
# 将获取的信息打印到日志
print(f"当前用户: {user}")
for thread in threads:
# Threads支持迭代,因此可以使用for循环逐条打印主题帖信息
# 当然了,Threads也支持使用下标的随机访问
print(f"tid: {thread.tid} 最后回复时间戳: {thread.last_time} 标题: {thread.title}")
# 使用asyncio.run执行协程main
asyncio.run(main())
```
### 样例解析
#### 什么是`asyncio.gather`?
你可以将若干协程作为参数传入`asyncio.gather`,样例中传入了两个协程。如果你忘记了协程和异步函数之间的区别,请及时复习。
`asyncio.gather`会为每个传入的协程创建对应的任务来同时执行它们(并发),同时`asyncio.gather(...)`自身也是一个协程,在前面添加`await`以要求主协程`main()`等待其执行完毕。执行完毕后,返回数据的顺序与传入协程的顺序一致,即`user`对应`client.get_self_info()`,`threads`对应`client.get_threads(...)`
### 期望结果
运行效果如下所示
```log
当前用户: Starry_OvO
tid: 7595618217 最后回复时间戳: 1672461980 标题: 关于负能量帖子的最新规定
tid: 8204562074 最后回复时间戳: 1672502281 标题: 外卖超时退单,心理煎熬
tid: 8165883863 最后回复时间戳: 1672502270 标题: 【记录】我这半醉半醒的人生啊
tid: 8204618726 最后回复时间戳: 1672502254 标题: 记录一下编导生的日常
tid: 8202743003 最后回复时间戳: 1672502252 标题: 2023会更好吗?或者,又是一年的碌碌无为
tid: 8204456677 最后回复时间戳: 1672502301 标题: 2023新年倒计时开始,有人的话请回复
tid: 8203409990 最后回复时间戳: 1672502197 标题: 年尾了,谢谢你们
tid: 8203959170 最后回复时间戳: 1672502156 标题: 求祝福
tid: 8188549079 最后回复时间戳: 1672502122 标题: pollen's club
tid: 8204240728 最后回复时间戳: 1672502091 标题: 这是孩子最贵重的东西
tid: 8200916354 最后回复时间戳: 1672502023 标题: 这个是真的吗
tid: 8204206290 最后回复时间戳: 1672501931 标题: 家里突然多了只狗,请大家取个名字
tid: 8204353842 最后回复时间戳: 1672501936 标题: 一个很好的外卖小哥
tid: 8204583367 最后回复时间戳: 1672501911 标题: 何等奇迹!坚韧灵魂!
tid: 8204431580 最后回复时间戳: 1672501835 标题: 大家今年想怎么跨年呢?
tid: 8204442527 最后回复时间戳: 1672501832 标题: 吧友们,快过年了能不能发一些温馨可爱的图
tid: 8202573308 最后回复时间戳: 1672501923 标题:
tid: 8202504004 最后回复时间戳: 1672501740 标题: 吧友们,想听到那4个字
tid: 8203284120 最后回复时间戳: 1672501971 标题: 看到评论区 觉得很暖心 想给吧友分享分享
tid: 8203290932 最后回复时间戳: 1672502300 标题:
tid: 8202592714 最后回复时间戳: 1672501686 标题: 不要走啊狗狗
tid: 8165292224 最后回复时间戳: 1672501498 标题: 你想要只肥啾吗?
tid: 8202351346 最后回复时间戳: 1672501588 标题: 这就是缘分吗?
tid: 8204609134 最后回复时间戳: 1672501304 标题:
tid: 8204575619 最后回复时间戳: 1672501526 标题: 标题五个字
tid: 8199583210 最后回复时间戳: 1672501343 标题: 一些有趣的图图
tid: 8204401395 最后回复时间戳: 1672494092 标题: 兄弟们 初来乍到
tid: 8200191186 最后回复时间戳: 1672500928 标题: 我妈做了一件好事
tid: 8204273523 最后回复时间戳: 1672500829 标题: 你如初待我模样
```
## 任务队列实现多协程爬虫
### 样例代码
本样例将通过任务队列实现一个多协程爬虫,快速爬取天堂鸡汤吧的前32页共960条主题帖,并打印其中浏览量最高的10条
```python
from __future__ import annotations
import asyncio
import time
import aiotieba as tb
from aiotieba.logging import get_logger as LOG
BDUSS = "在这里输入你账号的BDUSS"
async def crawler(fname: str):
"""
获取贴吧名为fname的贴吧的前32页中浏览量最高的10个主题帖
Args:
fname (str): 贴吧名
"""
start_time = time.perf_counter()
LOG().info("Spider start")
# thread_list用来保存主题帖列表
thread_list: list[tb.typing.Thread] = []
# 使用键名"default"对应的BDUSS创建客户端
async with tb.Client(BDUSS) as client:
# asyncio.Queue是一个任务队列
# maxsize=8意味着缓冲区长度为8
# 当缓冲区被填满时,调用Queue.put的协程会被阻塞
task_queue = asyncio.Queue(maxsize=8)
# 当is_running被设为False后,消费者会在超时后退出
is_running = True
async def producer():
"""
生产者协程
"""
for pn in range(32, 0, -1):
# 生产者使用Queue.put不断地将页码pn填入任务队列task_queue
await task_queue.put(pn)
# 这里需要nonlocal来允许对闭包外的变量的修改操作(类似于引用传递和值传递的区别)
nonlocal is_running
# 将is_running设置为False以允许各消费协程超时退出
is_running = False
async def worker(i: int):
"""
消费者协程
Args:
i (int): 协程编号
"""
while 1:
try:
# 消费者协程不断地使用Queue.get从task_queue中拉取由生产者协程提供的页码pn作为任务
# asyncio.wait_for会等待作为参数的协程执行完毕直到超时
# timeout=1即把超时时间设为1秒
# 如果超过1秒未获取到新的页码pn,asyncio.wait_for(...)将抛出asyncio.TimeoutError
pn = await asyncio.wait_for(task_queue.get(), timeout=1)
LOG().debug(f"Worker#{i} handling pn:{pn}")
except asyncio.TimeoutError:
# 捕获asyncio.TimeoutError以退出协程
if is_running is False:
# 如果is_running为False,意味着不需要再轮询task_queue获取新任务
LOG().debug(f"Worker#{i} quit")
# 消费者协程通过return退出
return
else:
# 执行被分派的任务,即爬取pn页的帖子列表
threads = await client.get_threads(fname, pn)
# 这里的nonlocal同样是为了修改闭包外的变量thread_list
nonlocal thread_list
thread_list += threads
# 创建8个消费者协程
workers = [worker(i) for i in range(8)]
# 使用asyncio.gather并发执行
# 需要注意这里*workers中的*意为将列表展开成多个参数
# 因为asyncio.gather只接受协程作为参数,不接受协程列表
await asyncio.gather(*workers, producer())
LOG().info(f"Spider complete. Time cost: {time.perf_counter() - start_time:.4f} secs")
# 按主题帖浏览量降序排序
thread_list.sort(key=lambda thread: thread.view_num, reverse=True)
# 将浏览量最高的10个主题帖的信息打印到日志
for i, thread in enumerate(thread_list[0:10], 1):
LOG().info(f"Rank#{i} view_num:{thread.view_num} title:{thread.title}")
# 执行协程crawler
asyncio.run(crawler("天堂鸡汤"))
```
### 期望结果
运行效果如下图所示
```log
<2023-01-01 00:03:01.195> [INFO] [crawler] Spider start
<2023-01-01 00:03:01.198> [DEBUG] [worker] Worker#0 handling pn:32
<2023-01-01 00:03:01.242> [DEBUG] [worker] Worker#1 handling pn:31
<2023-01-01 00:03:01.245> [DEBUG] [worker] Worker#2 handling pn:30
<2023-01-01 00:03:01.245> [DEBUG] [worker] Worker#3 handling pn:29
<2023-01-01 00:03:01.246> [DEBUG] [worker] Worker#4 handling pn:28
<2023-01-01 00:03:01.247> [DEBUG] [worker] Worker#5 handling pn:27
<2023-01-01 00:03:01.248> [DEBUG] [worker] Worker#6 handling pn:26
<2023-01-01 00:03:01.248> [DEBUG] [worker] Worker#7 handling pn:25
<2023-01-01 00:03:01.599> [DEBUG] [worker] Worker#7 handling pn:24
<2023-01-01 00:03:01.626> [DEBUG] [worker] Worker#4 handling pn:23
<2023-01-01 00:03:01.685> [DEBUG] [worker] Worker#2 handling pn:22
<2023-01-01 00:03:01.711> [DEBUG] [worker] Worker#5 handling pn:21
<2023-01-01 00:03:01.744> [DEBUG] [worker] Worker#3 handling pn:20
<2023-01-01 00:03:01.768> [DEBUG] [worker] Worker#0 handling pn:19
<2023-01-01 00:03:01.776> [DEBUG] [worker] Worker#1 handling pn:18
<2023-01-01 00:03:01.777> [DEBUG] [worker] Worker#6 handling pn:17
<2023-01-01 00:03:01.974> [DEBUG] [worker] Worker#5 handling pn:16
<2023-01-01 00:03:02.041> [DEBUG] [worker] Worker#7 handling pn:15
<2023-01-01 00:03:02.043> [DEBUG] [worker] Worker#4 handling pn:14
<2023-01-01 00:03:02.072> [DEBUG] [worker] Worker#6 handling pn:13
<2023-01-01 00:03:02.083> [DEBUG] [worker] Worker#2 handling pn:12
<2023-01-01 00:03:02.145> [DEBUG] [worker] Worker#3 handling pn:11
<2023-01-01 00:03:02.190> [DEBUG] [worker] Worker#0 handling pn:10
<2023-01-01 00:03:02.197> [DEBUG] [worker] Worker#1 handling pn:9
<2023-01-01 00:03:02.365> [DEBUG] [worker] Worker#7 handling pn:8
<2023-01-01 00:03:02.379> [DEBUG] [worker] Worker#2 handling pn:7
<2023-01-01 00:03:02.425> [DEBUG] [worker] Worker#5 handling pn:6
<2023-01-01 00:03:02.547> [DEBUG] [worker] Worker#6 handling pn:5
<2023-01-01 00:03:02.579> [DEBUG] [worker] Worker#4 handling pn:4
<2023-01-01 00:03:02.606> [DEBUG] [worker] Worker#3 handling pn:3
<2023-01-01 00:03:02.635> [DEBUG] [worker] Worker#0 handling pn:2
<2023-01-01 00:03:02.640> [DEBUG] [worker] Worker#1 handling pn:1
<2023-01-01 00:03:03.789> [DEBUG] [worker] Worker#5 quit
<2023-01-01 00:03:03.820> [DEBUG] [worker] Worker#7 quit
<2023-01-01 00:03:03.821> [DEBUG] [worker] Worker#2 quit
<2023-01-01 00:03:03.821> [DEBUG] [worker] Worker#6 quit
<2023-01-01 00:03:03.882> [DEBUG] [worker] Worker#4 quit
<2023-01-01 00:03:03.975> [DEBUG] [worker] Worker#0 quit
<2023-01-01 00:03:03.975> [DEBUG] [worker] Worker#1 quit
<2023-01-01 00:03:03.976> [INFO] [crawler] Spider complete. Time cost: 2.7822 secs
<2023-01-01 00:03:03.977> [INFO] [crawler] Rank#1 view_num:295571 title:各位发点暖心小故事吧我先来
<2023-01-01 00:03:03.978> [INFO] [crawler] Rank#2 view_num:285897 title:解决压力大
<2023-01-01 00:03:03.978> [INFO] [crawler] Rank#3 view_num:255771 title:人活着是为了什么
<2023-01-01 00:03:03.978> [INFO] [crawler] Rank#4 view_num:243325 title:面藕,我的面藕😭
<2023-01-01 00:03:03.979> [INFO] [crawler] Rank#5 view_num:222611 title:什么事情是你长大很久之后才明白的?
<2023-01-01 00:03:03.979> [INFO] [crawler] Rank#6 view_num:216527 title:教你谈恋爱
<2023-01-01 00:03:03.979> [INFO] [crawler] Rank#7 view_num:214848 title:你已经是只狗了!
<2023-01-01 00:03:03.980> [INFO] [crawler] Rank#8 view_num:208130 title:好温暖呀~
<2023-01-01 00:03:03.980> [INFO] [crawler] Rank#9 view_num:206946 title:好温柔的叔叔啊😭
<2023-01-01 00:03:03.980> [INFO] [crawler] Rank#10 view_num:203606 title:你会不会删掉已故亲人的联系方式?
```
================================================
FILE: mkdocs.yml
================================================
site_name: aiotieba
site_description: aiotieba开发文档
site_url: https://aiotieba.cc/
theme:
name: material
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- navigation.sections
- search.suggest
- search.highlight
language: zh
repo_name: lumina37/aiotieba
repo_url: https://github.com/lumina37/aiotieba/
nav:
- 介绍: index.md
- 教程:
- 入门教程: tutorial/start.md
- 异步编程入门教程: tutorial/async_start.md
- 实用微脚本合集: tutorial/many_utils.md
- 参考文档:
- 客户端 (Client): ref/client.md
- 枚举: ref/enums.md
- 配置: ref/config.md
- 异常处理: ref/exception.md
- 类型定义:
- forum_detail: ref/classdef/forum_detail.md
- threads: ref/classdef/threads.md
- posts: ref/classdef/posts.md
- comments: ref/classdef/comments.md
- last_replyers: ref/classdef/last_replyers.md
- searches: ref/classdef/searches.md
- user_info: ref/classdef/user_info.md
- profile: ref/classdef/profile.md
- follow_forums: ref/classdef/follow_forums.md
- self_follow_forums: ref/classdef/self_follow_forums.md
- user_contents: ref/classdef/user_contents.md
- images: ref/classdef/images.md
- replys: ref/classdef/replys.md
- ats: ref/classdef/ats.md
- follows: ref/classdef/follows.md
- fans: ref/classdef/fans.md
- blacklist: ref/classdef/blacklist.md
- blacklist_old: ref/classdef/blacklist_old.md
- dislike_forums: ref/classdef/dislike_forums.md
- square_forums: ref/classdef/square_forums.md
- bawu_info: ref/classdef/bawu_info.md
- bawu_perm: ref/classdef/bawu_perm.md
- rank_users: ref/classdef/rank_users.md
- member_users: ref/classdef/member_users.md
- blocks: ref/classdef/blocks.md
- recovers: ref/classdef/recovers.md
- recover_thread: ref/classdef/recover_thread.md
- bawu_userlogs: ref/classdef/bawu_userlogs.md
- bawu_postlogs: ref/classdef/bawu_postlogs.md
- unblock_appeals: ref/classdef/unblock_appeals.md
- bawu_blacklist: ref/classdef/bawu_blacklist.md
- statistics: ref/classdef/statistics.md
- recom_status: ref/classdef/recom_status.md
- group_msg: ref/classdef/group_msg.md
markdown_extensions:
- md_in_html
- admonition
- codehilite:
css_class: highlight
plugins:
- search
- mkdocstrings:
handlers:
python:
options:
show_bases: false
show_source: false
members_order: source
extra_css:
- css/custom.css
================================================
FILE: pyproject.toml
================================================
[project]
name = "aiotieba"
version = "4.7.0"
description = "Asynchronous I/O Client for Baidu Tieba"
authors = [{ name = "lumina37", email = "starry.qvq@gmail.com" }]
urls = { Repository = "https://github.com/lumina37/aiotieba/", Documentation = "https://aiotieba.cc/" }
readme = "README.md"
keywords = ["baidu", "tieba"]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: The Unlicense (Unlicense)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Internet :: WWW/HTTP :: Session",
]
requires-python = ">=3.10,<3.15"
dependencies = [
"aiohttp>=3.11.0,<4;python_version>='3.10' and python_version<'3.14'",
"aiohttp>=3.13.0,<4;python_version>='3.14'",
"beautifulsoup4>=4.7.1,<5",
"lxml>=4.6.4,<7;python_version=='3.10'",
"lxml>=4.9.2,<7;python_version=='3.11'",
"lxml>=4.9.3,<7;python_version=='3.12'",
"lxml>=5.3.0,<7;python_version=='3.13'",
"lxml>=6.0.1,<7;python_version>='3.14'",
"protobuf>=4.21.1,<8",
"cryptography>=35.0.0,<47",
"async-timeout>=4.0,<6;python_version=='3.10'",
"StrEnum>=0.4.0,<0.5;python_version=='3.10'",
]
[project.optional-dependencies]
img = [
"opencv-contrib-python-headless>=4.6.0.66,<5;sys_platform=='linux'",
"opencv-contrib-python>=4.6.0.66,<5;sys_platform!='linux'",
]
speedup = [
"orjson>=3.4.7,<4;python_version=='3.10'",
"orjson>=3.7.10,<4;python_version=='3.11'",
"orjson>=3.9.10,<4;python_version=='3.12'",
"orjson>=3.10.7,<4;python_version=='3.13'",
"orjson>=3.11.1,<4;python_version>='3.14'",
]
[dependency-groups]
dev = ["pytest==9.0.3", "pytest-asyncio==1.3.0", "pytest-rerunfailures==16.1"]
docs = ["mkdocs-material", "mkdocstrings[python]"]
[build-system]
requires = ["scikit-build-core>=0.12.2,<0.13"]
build-backend = "scikit_build_core.build"
[tool.uv]
managed = true
[tool.scikit-build]
sdist.exclude = ["*.proto", ".*", "docs", "scripts", "tests", "mkdocs.yml"]
wheel.exclude = ["*.c", "*.h", "*.txt"]
[[tool.scikit-build.generate]]
path = "aiotieba/__version__.py"
template = '''__version__ = "${version}"'''
[tool.cibuildwheel]
build = "cp310* cp311* cp312* cp313* cp314* pp310* pp311*"
skip = "*-win32 *_i686 *_s390x *_ppc64le"
enable = ["pypy", "pypy-eol"]
build-frontend = "uv"
[tool.ruff]
line-length = 120
target-version = "py310"
preview = true
[tool.ruff.lint]
select = [
"F",
"E",
"W",
"I",
"UP",
"YTT",
"ASYNC",
"B",
"A",
"C4",
"FA",
"ICN",
"LOG",
"G",
"PIE",
"T20",
"PT",
"Q",
"RSE",
"SLOT",
"TC",
"PTH",
"NPY",
"PERF",
"FURB",
]
ignore = ["A005", "E402", "E501", "E266"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"typing.py" = ["F401"]
"*_pb2.py" = ["F401"]
[tool.pytest.ini_options]
addopts = "-q"
testpaths = ["tests"]
required_plugins = "pytest-asyncio pytest-rerunfailures"
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
================================================
FILE: scripts/proto_compile.py
================================================
from __future__ import annotations
import subprocess
from pathlib import Path
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Iterator
commom_proto_pth = Path("src/aiotieba/api/_protobuf")
for fpth in commom_proto_pth.glob("*_pb2.py"):
fpth.unlink()
subprocess.run("protoc --python_out=. *.proto", cwd=str(commom_proto_pth), check=True, timeout=60.0)
def row_filter(rows: list[str], import_perfix: str) -> Iterator[str]:
is_runtime_checker = False
for row in rows:
if row.startswith("#"):
continue
if not is_runtime_checker and row.startswith("_runtime"):
is_runtime_checker = True
if is_runtime_checker and row.startswith(")"):
is_runtime_checker = False
continue
if is_runtime_checker:
continue
if "import runtime_version" in row:
continue
if row.startswith("import"):
row = import_perfix + row
yield row
for fpth in commom_proto_pth.glob("*_pb2.py"):
bak_fpth = fpth.with_suffix(".bak")
with (
fpth.open("r") as f,
bak_fpth.open("w") as bak_f,
):
bak_f.writelines(row_filter(f, "from . "))
fpth.unlink()
bak_fpth.rename(fpth)
for mod_pth in Path("src/aiotieba/api").glob("*/protobuf"):
for fpth in mod_pth.glob("*_pb2.py"):
fpth.unlink()
subprocess.run("protoc -I../../_protobuf -I. --python_out=. *.proto", cwd=str(mod_pth), check=True, timeout=10.0)
for fpth in mod_pth.glob("*_pb2.py"):
bak_fpth = fpth.with_suffix(".bak")
with (
fpth.open("r") as f,
bak_fpth.open("w") as bak_f,
):
bak_f.writelines(row_filter(f, "from ..._protobuf "))
fpth.unlink()
bak_fpth.rename(fpth)
subprocess.run("uvx ruff check src/**/*_pb2.py --fix --unsafe-fixes -s", cwd=".", check=False, timeout=10.0)
subprocess.run("uvx ruff format src/**/*_pb2.py -s", cwd=".", check=False, timeout=30.0)
================================================
FILE: src/aiotieba/__init__.py
================================================
"""
Asynchronous I/O Client/Reviewer for Baidu Tieba
@Author: starry.qvq@gmail.com
@License: Unlicense
@Documentation: https://aiotieba.cc/
"""
from . import const, core, enums, exception, logging, typing
from .__version__ import __version__
from .client import Client
from .config import ProxyConfig, TimeoutConfig
from .core import Account
from .enums import * # noqa: F403
from .logging import enable_filelog, get_logger
================================================
FILE: src/aiotieba/__version__.py
================================================
__version__ = "TBD"
================================================
FILE: src/aiotieba/api/__init__.py
================================================
================================================
FILE: src/aiotieba/api/_classdef/__init__.py
================================================
from ...core import Account
from .common import TypeMessage
from .container import Containers
from .contents import (
FragAt,
FragEmoji,
FragImage,
FragItem,
FragLink,
FragText,
FragTiebaPlus,
FragUnknown,
TypeFragAt,
TypeFragEmoji,
TypeFragImage,
TypeFragItem,
TypeFragLink,
TypeFragment,
TypeFragText,
TypeFragTiebaPlus,
)
from .user import UserInfo
from .vote import VoteInfo
================================================
FILE: src/aiotieba/api/_classdef/common.py
================================================
from typing import TypeVar
from google.protobuf.message import Message
TypeMessage = TypeVar("TypeMessage", bound=Message)
================================================
FILE: src/aiotieba/api/_classdef/container.py
================================================
from __future__ import annotations
import dataclasses as dcs
from typing import TYPE_CHECKING, Generic, SupportsIndex, TypeVar, overload
if TYPE_CHECKING:
from collections.abc import Iterator
TypeContainer = TypeVar("TypeContainer")
@dcs.dataclass
class Containers(Generic[TypeContainer]):
"""
内容列表的泛型基类
约定取内容的通用接口
Attributes:
objs (list[TypeContainer]): 内容列表
"""
objs: list[TypeContainer] = dcs.field(default_factory=list)
def __iter__(self) -> Iterator[TypeContainer]:
return self.objs.__iter__()
@overload
def __getitem__(self, idx: SupportsIndex) -> TypeContainer: ...
@overload
def __getitem__(self, idx: slice) -> list[TypeContainer]: ...
def __getitem__(self, idx):
return self.objs.__getitem__(idx)
def __setitem__(self, idx, val):
raise NotImplementedError
def __delitem__(self, idx):
raise NotImplementedError
def __len__(self) -> int:
return self.objs.__len__()
def __bool__(self) -> bool:
return bool(self.objs)
================================================
FILE: src/aiotieba/api/_classdef/contents.py
================================================
from __future__ import annotations
import dataclasses as dcs
import re
from functools import cached_property
from typing import TYPE_CHECKING, Any, Protocol, TypeVar
import yarl
if TYPE_CHECKING:
from collections.abc import Mapping
from .common import TypeMessage
TypeFragment = TypeVar("TypeFragment")
@dcs.dataclass
class FragText:
"""
纯文本碎片
Attributes:
text (str): 文本内容
"""
text: str = ""
@staticmethod
def from_proto(data_proto: TypeMessage) -> FragText:
text = data_proto.text
return FragText(text)
@staticmethod
def from_json(data_map: Mapping) -> FragText:
text = data_map["text"]
return FragText(text)
class TypeFragText(Protocol):
text: str
@dcs.dataclass
class FragEmoji:
"""
表情碎片
Attributes:
id (str): 表情图片id
desc (str): 表情描述
"""
id: str = ""
desc: str = ""
@staticmethod
def from_proto(data_proto: TypeMessage) -> FragEmoji:
id_ = data_proto.text
desc = data_proto.c
return FragEmoji(id_, desc)
class TypeFragEmoji(Protocol):
id: str
desc: str
_IMAGEHASH_EXP = re.compile(r"/([a-z0-9]{32,})\.")
@dcs.dataclass
class FragImage:
"""
图像碎片
Attributes:
src (str): 小图链接 宽720px
big_src (str): 大图链接 宽960px
origin_src (str): 原图链接
origin_size (int): 原图大小
show_width (int): 图像在客户端预览显示的宽度
show_height (int): 图像在客户端预览显示的高度
hash (str): 百度图床hash
"""
src: str = dcs.field(default="", repr=False)
big_src: str = dcs.field(default="", repr=False)
origin_src: str = dcs.field(default="", repr=False)
origin_size: int = 0
show_width: int = 0
show_height: int = 0
hash: str = ""
@staticmethod
def from_proto(data_proto: TypeMessage) -> FragImage:
src = data_proto.cdn_src
big_src = data_proto.big_cdn_src
origin_src = data_proto.origin_src
origin_size = data_proto.origin_size
show_width, _, show_height = data_proto.bsize.partition(",")
show_width = int(show_width)
show_height = int(show_height)
if hash_obj := _IMAGEHASH_EXP.search(src):
hash_ = hash_obj.group(1)
else:
hash_ = ""
return FragImage(src, big_src, origin_src, origin_size, show_width, show_height, hash_)
@dcs.dataclass
class TypeFragImage(Protocol):
src: str
origin_src: str
hash: str
@dcs.dataclass
class FragAt:
"""
@碎片
Attributes:
text (str): 被@用户的昵称 含@
user_id (int): 被@用户的user_id
"""
text: str = ""
user_id: int = 0
@staticmethod
def from_proto(data_proto: TypeMessage) -> FragAt:
text = data_proto.text
user_id = data_proto.uid
return FragAt(text, user_id)
class TypeFragAt(Protocol):
text: str
user_id: int
@dcs.dataclass
class FragVoice:
"""
音频碎片
Attributes:
md5 (str): 音频md5
duration (int): 音频长度 以秒为单位
"""
md5: str = ""
duration: int = 0
@staticmethod
def from_proto(data_proto: TypeMessage) -> FragVoice:
md5 = data_proto.voice_md5
duration = data_proto.during_time / 1000
return FragVoice(md5, duration)
def __bool__(self) -> bool:
return bool(self.md5)
class TypeFragVoice(Protocol):
md5: str
duration: int
@dcs.dataclass
class FragVideo:
"""
视频碎片
Attributes:
src (str): 视频链接
cover_src (str): 封面链接
duration (int): 视频长度
width (int): 视频宽度
height (int): 视频高度
view_num (int): 浏览次数
"""
src: str = ""
cover_src: str = ""
duration: int = 0
width: int = 0
height: int = 0
view_num: int = 0
@staticmethod
def from_proto(data_proto: TypeMessage) -> FragVideo:
src = data_proto.video_url
cover_src = data_proto.thumbnail_url
duration = data_proto.video_duration
width = data_proto.video_width
height = data_proto.video_height
view_num = data_proto.play_count
return FragVideo(src, cover_src, duration, width, height, view_num)
def __bool__(self) -> bool:
return bool(self.width)
class TypeFragVideo(Protocol):
src: str
cover_src: str
duration: int
width: int
height: int
view_num: int
@dcs.dataclass
class FragLink:
"""
链接碎片
Attributes:
text (str): 原链接
title (str): 链接标题
raw_url (yarl.URL): 解析后的原链接
url (yarl.URL): 解析后的去前缀链接
is_external (bool): 是否外部链接
"""
text: str = ""
title: str = ""
raw_url: yarl.URL = dcs.field(default_factory=yarl.URL)
@staticmethod
def from_proto(data_proto: TypeMessage) -> FragLink:
text = data_proto.link
title = data_proto.text
raw_url = yarl.URL(text)
return FragLink(text, title, raw_url)
@staticmethod
def from_json(data_map: Mapping) -> FragLink:
text = data_map["link"]
title = data_map["text"]
raw_url = yarl.URL(text)
return FragLink(text, title, raw_url)
@cached_property
def url(self) -> yarl.URL:
if self.is_external:
url = yarl.URL(self.raw_url.query["url"])
else:
url = self.raw_url
return url
@cached_property
def is_external(self) -> bool:
return self.raw_url.path == "/mo/q/checkurl"
class TypeFragLink(Protocol):
text: str
title: str
raw_url: yarl.URL
@property
def url(self) -> yarl.URL: ...
@property
def is_external(self) -> bool: ...
@dcs.dataclass
class FragTiebaPlus:
"""
贴吧plus广告碎片
Attributes:
text (str): 贴吧plus广告描述
url (yarl.URL): 解析后的贴吧plus广告跳转链接
"""
text: str = ""
url: yarl.URL = dcs.field(default_factory=yarl.URL)
@staticmethod
def from_proto(data_proto: TypeMessage) -> FragTiebaPlus:
text = data_proto.tiebaplus_info.desc
url = yarl.URL(data_proto.tiebaplus_info.jump_url)
return FragTiebaPlus(text, url)
class TypeFragTiebaPlus(Protocol):
text: str
url: yarl.URL
@dcs.dataclass
class FragItem:
"""
item碎片
Attributes:
text (str): item名称
"""
text: str = ""
@staticmethod
def from_proto(data_proto: TypeMessage) -> FragItem:
text = data_proto.item.item_name
return FragItem(text)
class TypeFragItem(Protocol):
text: str
@dcs.dataclass
class FragUnknown:
"""
未知碎片
Attributes:
data (Any): 原始数据
"""
proto: Any
@staticmethod
def from_proto(data: Any) -> FragUnknown:
return FragUnknown(data)
@staticmethod
def from_json(data: Mapping) -> FragUnknown:
return FragUnknown(data)
================================================
FILE: src/aiotieba/api/_classdef/user.py
================================================
from __future__ import annotations
import dataclasses as dcs
from ...enums import Gender, PrivLike, PrivReply
@dcs.dataclass
class UserInfo:
"""
用户信息
Attributes:
user_id (int): user_id
portrait (str): portrait
user_name (str): 用户名
nick_name_old (str): 旧版昵称
nick_name_new (str): 新版昵称
tieba_uid (int): 用户个人主页uid
glevel (int): 贴吧成长等级
gender (Gender): 性别
age (float): 吧龄 以年为单位
post_num (int): 发帖数
agree_num (int): 获赞数
fan_num (int): 粉丝数
follow_num (int): 关注数
forum_num (int): 关注贴吧数
sign (str): 个性签名
ip (str): ip归属地
icons (list[str]): 印记信息
is_vip (bool): 是否超级会员
is_god (bool): 是否大神
is_blocked (bool): 是否被永久封禁屏蔽
priv_like (PrivLike): 关注吧列表的公开状态
priv_reply (PrivReply): 帖子评论权限
nick_name (str): 用户昵称
show_name (str): 显示名称
log_name (str): 用于在日志中记录用户信息
"""
user_id: int = 0
portrait: str = ""
user_name: str = ""
nick_name_old: str = ""
nick_name_new: str = ""
tieba_uid: int = 0
glevel: int = 0
gender: Gender = Gender.UNKNOWN
age: float = 0.0
post_num: int = 0
agree_num: int = 0
fan_num: int = 0
follow_num: int = 0
forum_num: int = 0
sign: str = ""
ip: str = ""
icons: list[str] = dcs.field(default_factory=list)
is_vip: bool = False
is_god: bool = False
is_blocked: bool = False
uk: int = 0
bduk: str = ""
trigger_id: int = 0
priv_like: PrivLike = PrivLike.PUBLIC
priv_reply: PrivReply = PrivReply.ALL
def __str__(self) -> str:
return self.user_name or self.portrait or str(self.user_id)
def __eq__(self, obj: UserInfo) -> bool:
return self.user_id == obj.user_id
def __hash__(self) -> int:
return self.user_id
def __bool__(self) -> bool:
return bool(self.user_id)
def __ior__(self, obj) -> UserInfo:
for field in dcs.fields(obj):
if hasattr(self, field.name):
val = getattr(obj, field.name)
setattr(self, field.name, val)
return self
@property
def nick_name(self) -> str:
return self.nick_name_new or self.nick_name_old
@property
def show_name(self) -> str:
return self.nick_name_new or self.nick_name_old or self.user_name
@property
def log_name(self) -> str:
if self.user_name:
return self.user_name
elif self.portrait:
return f"{self.nick_name}/{self.portrait}"
else:
return str(self.user_id)
================================================
FILE: src/aiotieba/api/_classdef/vote.py
================================================
from __future__ import annotations
import dataclasses as dcs
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .common import TypeMessage
@dcs.dataclass
class VoteOption:
"""
投票选项信息
Attributes:
vote_num (int): 得票数
text (str): 选项描述文字
"""
vote_num: int = 0
text: str = ""
@staticmethod
def from_proto(data_proto: TypeMessage) -> VoteOption:
vote_num = data_proto.num
text = data_proto.text
return VoteOption(vote_num, text)
@dcs.dataclass
class VoteInfo:
"""
投票信息
Attributes:
title (str): 投票标题
is_multi (bool): 是否多选
options (list[VoteOption]): 选项列表
total_vote (int): 总投票数
total_user (int): 总投票人数
"""
title: str = ""
is_multi: bool = False
options: list[VoteOption] = dcs.field(default_factory=list)
total_vote: int = 0
total_user: int = 0
@staticmethod
def from_proto(data_proto: TypeMessage) -> VoteInfo:
title = data_proto.title
is_multi = bool(data_proto.is_multi)
options = [VoteOption.from_proto(p) for p in data_proto.options]
total_vote = data_proto.total_poll
total_user = data_proto.total_num
return VoteInfo(title, is_multi, options, total_vote, total_user)
def __len__(self) -> int:
return len(self.options)
def __bool__(self) -> bool:
return bool(self.options)
================================================
FILE: src/aiotieba/api/_protobuf/Agree.proto
================================================
// tbclient.Agree
syntax = "proto3";
message Agree {
int64 agree_num = 1;
int64 disagree_num = 4;
}
================================================
FILE: src/aiotieba/api/_protobuf/Agree_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x0b\x41gree.proto"0\n\x05\x41gree\x12\x11\n\tagree_num\x18\x01 \x01(\x03\x12\x14\n\x0c\x64isagree_num\x18\x04 \x01(\x03\x62\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "Agree_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_AGREE"]._serialized_start = 15
_globals["_AGREE"]._serialized_end = 63
================================================
FILE: src/aiotieba/api/_protobuf/CommonReq.proto
================================================
// tbclient.CommonReq
syntax = "proto3";
message CommonReq {
int32 _client_type = 1;
string _client_version = 2;
string _client_id = 3;
string _phone_imei = 5;
string _from = 6;
string cuid = 7;
int64 _timestamp = 8;
string model = 9;
string BDUSS = 10;
string tbs = 11;
int32 net_type = 12;
string pversion = 24;
string _os_version = 25;
string brand = 26;
string lego_lib_version = 28;
string applist = 29;
string stoken = 30;
string z_id = 31;
string cuid_galaxy2 = 32;
string cuid_gid = 33;
string c3_aid = 35;
string sample_id = 36;
int32 scr_w = 37;
int32 scr_h = 38;
double scr_dip = 39;
int32 q_type = 40;
int32 is_teenager = 41;
string sdk_ver = 42;
string framework_ver = 43;
string naws_game_ver = 44;
int64 active_timestamp = 49;
int64 first_install_time = 50;
int64 last_update_time = 51;
string event_day = 53;
string android_id = 54;
int32 cmode = 55;
string start_scheme = 56;
int32 start_type = 57;
string idfv = 60;
string extra = 61;
string user_agent = 62;
int32 personalized_rec_switch = 63;
string device_score = 70;
}
================================================
FILE: src/aiotieba/api/_protobuf/CommonReq_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b"\n\x0f\x43ommonReq.proto\"\xc6\x06\n\tCommonReq\x12\x14\n\x0c_client_type\x18\x01 \x01(\x05\x12\x17\n\x0f_client_version\x18\x02 \x01(\t\x12\x12\n\n_client_id\x18\x03 \x01(\t\x12\x13\n\x0b_phone_imei\x18\x05 \x01(\t\x12\r\n\x05_from\x18\x06 \x01(\t\x12\x0c\n\x04\x63uid\x18\x07 \x01(\t\x12\x12\n\n_timestamp\x18\x08 \x01(\x03\x12\r\n\x05model\x18\t \x01(\t\x12\r\n\x05\x42\x44USS\x18\n \x01(\t\x12\x0b\n\x03tbs\x18\x0b \x01(\t\x12\x10\n\x08net_type\x18\x0c \x01(\x05\x12\x10\n\x08pversion\x18\x18 \x01(\t\x12\x13\n\x0b_os_version\x18\x19 \x01(\t\x12\r\n\x05\x62rand\x18\x1a \x01(\t\x12\x18\n\x10lego_lib_version\x18\x1c \x01(\t\x12\x0f\n\x07\x61pplist\x18\x1d \x01(\t\x12\x0e\n\x06stoken\x18\x1e \x01(\t\x12\x0c\n\x04z_id\x18\x1f \x01(\t\x12\x14\n\x0c\x63uid_galaxy2\x18 \x01(\t\x12\x10\n\x08\x63uid_gid\x18! \x01(\t\x12\x0e\n\x06\x63\x33_aid\x18# \x01(\t\x12\x11\n\tsample_id\x18$ \x01(\t\x12\r\n\x05scr_w\x18% \x01(\x05\x12\r\n\x05scr_h\x18& \x01(\x05\x12\x0f\n\x07scr_dip\x18' \x01(\x01\x12\x0e\n\x06q_type\x18( \x01(\x05\x12\x13\n\x0bis_teenager\x18) \x01(\x05\x12\x0f\n\x07sdk_ver\x18* \x01(\t\x12\x15\n\rframework_ver\x18+ \x01(\t\x12\x15\n\rnaws_game_ver\x18, \x01(\t\x12\x18\n\x10\x61\x63tive_timestamp\x18\x31 \x01(\x03\x12\x1a\n\x12\x66irst_install_time\x18\x32 \x01(\x03\x12\x18\n\x10last_update_time\x18\x33 \x01(\x03\x12\x11\n\tevent_day\x18\x35 \x01(\t\x12\x12\n\nandroid_id\x18\x36 \x01(\t\x12\r\n\x05\x63mode\x18\x37 \x01(\x05\x12\x14\n\x0cstart_scheme\x18\x38 \x01(\t\x12\x12\n\nstart_type\x18\x39 \x01(\x05\x12\x0c\n\x04idfv\x18< \x01(\t\x12\r\n\x05\x65xtra\x18= \x01(\t\x12\x12\n\nuser_agent\x18> \x01(\t\x12\x1f\n\x17personalized_rec_switch\x18? \x01(\x05\x12\x14\n\x0c\x64\x65vice_score\x18\x46 \x01(\tb\x06proto3"
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "CommonReq_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_COMMONREQ"]._serialized_start = 20
_globals["_COMMONREQ"]._serialized_end = 858
================================================
FILE: src/aiotieba/api/_protobuf/Error.proto
================================================
// tbclient.Error
syntax = "proto3";
message Error {
int32 errorno = 1;
string errmsg = 2;
}
================================================
FILE: src/aiotieba/api/_protobuf/Error_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x0b\x45rror.proto"(\n\x05\x45rror\x12\x0f\n\x07\x65rrorno\x18\x01 \x01(\x05\x12\x0e\n\x06\x65rrmsg\x18\x02 \x01(\tb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "Error_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_ERROR"]._serialized_start = 15
_globals["_ERROR"]._serialized_end = 55
================================================
FILE: src/aiotieba/api/_protobuf/ForumList.proto
================================================
// Not actually exist
syntax = "proto3";
message ForumList {
int64 forum_id = 1;
string forum_name = 2;
int32 member_count = 4;
int64 post_num = 7;
int64 thread_num = 8;
}
================================================
FILE: src/aiotieba/api/_protobuf/ForumList_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x0f\x46orumList.proto"m\n\tForumList\x12\x10\n\x08\x66orum_id\x18\x01 \x01(\x03\x12\x12\n\nforum_name\x18\x02 \x01(\t\x12\x14\n\x0cmember_count\x18\x04 \x01(\x05\x12\x10\n\x08post_num\x18\x07 \x01(\x03\x12\x12\n\nthread_num\x18\x08 \x01(\x03\x62\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "ForumList_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_FORUMLIST"]._serialized_start = 19
_globals["_FORUMLIST"]._serialized_end = 128
================================================
FILE: src/aiotieba/api/_protobuf/FrsTabInfo.proto
================================================
// tbclient.FrsTabInfo
syntax = "proto3";
message FrsTabInfo {
int32 tab_id = 1;
string tab_name = 3;
}
================================================
FILE: src/aiotieba/api/_protobuf/FrsTabInfo_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x10\x46rsTabInfo.proto".\n\nFrsTabInfo\x12\x0e\n\x06tab_id\x18\x01 \x01(\x05\x12\x10\n\x08tab_name\x18\x03 \x01(\tb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "FrsTabInfo_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_FRSTABINFO"]._serialized_start = 20
_globals["_FRSTABINFO"]._serialized_end = 66
================================================
FILE: src/aiotieba/api/_protobuf/Lcm.proto
================================================
syntax = "proto3";
message Common {
string cuid = 1;
string device = 2;
string os_version = 3;
string manufacture = 4;
string model_type = 5;
string app_id = 6;
string app_version = 7;
string sdk_version = 8;
string network = 9;
string rom_version = 10;
string user_key = 11;
}
message LcmNotify {
int64 log_id = 1;
int32 action = 2;
}
message LcmRequest {
int64 log_id = 1;
string token = 2;
Common common = 3;
int64 timestamp = 4;
int32 action = 5;
int32 start_type = 6;
int32 conn_type = 7;
}
message LcmResponse {
int64 log_id = 1;
int32 error_code = 2;
string error_msg = 3;
int64 next_interval_ms = 4;
string server_info = 5;
}
message RpcData {
LcmRequest lcm_request = 1;
LcmResponse lcm_response = 2;
LcmNotify lcm_notify = 3;
}
================================================
FILE: src/aiotieba/api/_protobuf/Lcm_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\tLcm.proto"\xd5\x01\n\x06\x43ommon\x12\x0c\n\x04\x63uid\x18\x01 \x01(\t\x12\x0e\n\x06\x64\x65vice\x18\x02 \x01(\t\x12\x12\n\nos_version\x18\x03 \x01(\t\x12\x13\n\x0bmanufacture\x18\x04 \x01(\t\x12\x12\n\nmodel_type\x18\x05 \x01(\t\x12\x0e\n\x06\x61pp_id\x18\x06 \x01(\t\x12\x13\n\x0b\x61pp_version\x18\x07 \x01(\t\x12\x13\n\x0bsdk_version\x18\x08 \x01(\t\x12\x0f\n\x07network\x18\t \x01(\t\x12\x13\n\x0brom_version\x18\n \x01(\t\x12\x10\n\x08user_key\x18\x0b \x01(\t"+\n\tLcmNotify\x12\x0e\n\x06log_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tion\x18\x02 \x01(\x05"\x8e\x01\n\nLcmRequest\x12\x0e\n\x06log_id\x18\x01 \x01(\x03\x12\r\n\x05token\x18\x02 \x01(\t\x12\x17\n\x06\x63ommon\x18\x03 \x01(\x0b\x32\x07.Common\x12\x11\n\ttimestamp\x18\x04 \x01(\x03\x12\x0e\n\x06\x61\x63tion\x18\x05 \x01(\x05\x12\x12\n\nstart_type\x18\x06 \x01(\x05\x12\x11\n\tconn_type\x18\x07 \x01(\x05"s\n\x0bLcmResponse\x12\x0e\n\x06log_id\x18\x01 \x01(\x03\x12\x12\n\nerror_code\x18\x02 \x01(\x05\x12\x11\n\terror_msg\x18\x03 \x01(\t\x12\x18\n\x10next_interval_ms\x18\x04 \x01(\x03\x12\x13\n\x0bserver_info\x18\x05 \x01(\t"o\n\x07RpcData\x12 \n\x0blcm_request\x18\x01 \x01(\x0b\x32\x0b.LcmRequest\x12"\n\x0clcm_response\x18\x02 \x01(\x0b\x32\x0c.LcmResponse\x12\x1e\n\nlcm_notify\x18\x03 \x01(\x0b\x32\n.LcmNotifyb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "Lcm_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_COMMON"]._serialized_start = 14
_globals["_COMMON"]._serialized_end = 227
_globals["_LCMNOTIFY"]._serialized_start = 229
_globals["_LCMNOTIFY"]._serialized_end = 272
_globals["_LCMREQUEST"]._serialized_start = 275
_globals["_LCMREQUEST"]._serialized_end = 417
_globals["_LCMRESPONSE"]._serialized_start = 419
_globals["_LCMRESPONSE"]._serialized_end = 534
_globals["_RPCDATA"]._serialized_start = 536
_globals["_RPCDATA"]._serialized_end = 647
================================================
FILE: src/aiotieba/api/_protobuf/Media.proto
================================================
// tbclient.Media
syntax = "proto3";
message Media {
int32 type = 1;
string small_pic = 2;
string big_pic = 3;
string water_pic = 4;
uint32 width = 10;
uint32 height = 11;
string origin_pic = 15;
uint32 origin_size = 16;
}
================================================
FILE: src/aiotieba/api/_protobuf/Media_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x0bMedia.proto"\x94\x01\n\x05Media\x12\x0c\n\x04type\x18\x01 \x01(\x05\x12\x11\n\tsmall_pic\x18\x02 \x01(\t\x12\x0f\n\x07\x62ig_pic\x18\x03 \x01(\t\x12\x11\n\twater_pic\x18\x04 \x01(\t\x12\r\n\x05width\x18\n \x01(\r\x12\x0e\n\x06height\x18\x0b \x01(\r\x12\x12\n\norigin_pic\x18\x0f \x01(\t\x12\x13\n\x0borigin_size\x18\x10 \x01(\rb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "Media_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_MEDIA"]._serialized_start = 16
_globals["_MEDIA"]._serialized_end = 164
================================================
FILE: src/aiotieba/api/_protobuf/Page.proto
================================================
// tbclient.Page
syntax = "proto3";
message Page {
int32 page_size = 1;
int32 current_page = 3;
int32 total_count = 4;
int32 total_page = 5;
int32 has_more = 6;
int32 has_prev = 7;
}
================================================
FILE: src/aiotieba/api/_protobuf/Page_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\nPage.proto"|\n\x04Page\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x14\n\x0c\x63urrent_page\x18\x03 \x01(\x05\x12\x13\n\x0btotal_count\x18\x04 \x01(\x05\x12\x12\n\ntotal_page\x18\x05 \x01(\x05\x12\x10\n\x08has_more\x18\x06 \x01(\x05\x12\x10\n\x08has_prev\x18\x07 \x01(\x05\x62\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "Page_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_PAGE"]._serialized_start = 14
_globals["_PAGE"]._serialized_end = 138
================================================
FILE: src/aiotieba/api/_protobuf/PbContent.proto
================================================
// tbclient.PbContent
syntax = "proto3";
message PbContent {
uint32 type = 1;
string text = 2;
string link = 3;
string src = 4;
string bsize = 5;
string cdn_src = 8;
string big_cdn_src = 9;
string c = 11;
string voice_md5 = 12;
uint32 during_time = 13;
int64 uid = 15;
uint32 width = 18;
uint32 height = 19;
string origin_src = 25;
uint32 origin_size = 27;
int32 count = 28;
message TiebaPlusInfo {
string title = 1;
string desc = 2;
string jump_url = 3;
string app_icon = 6;
int32 target_type = 12;
int32 h5_jump_type = 13;
string h5_jump_number = 14;
string h5_jump_param = 15;
int32 jump_type = 16;
string button_desc = 23;
}
TiebaPlusInfo tiebaplus_info = 40;
message Item {
string item_name = 2;
}
Item item = 41;
}
================================================
FILE: src/aiotieba/api/_protobuf/PbContent_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x0fPbContent.proto"\xcf\x04\n\tPbContent\x12\x0c\n\x04type\x18\x01 \x01(\r\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x0c\n\x04link\x18\x03 \x01(\t\x12\x0b\n\x03src\x18\x04 \x01(\t\x12\r\n\x05\x62size\x18\x05 \x01(\t\x12\x0f\n\x07\x63\x64n_src\x18\x08 \x01(\t\x12\x13\n\x0b\x62ig_cdn_src\x18\t \x01(\t\x12\t\n\x01\x63\x18\x0b \x01(\t\x12\x11\n\tvoice_md5\x18\x0c \x01(\t\x12\x13\n\x0b\x64uring_time\x18\r \x01(\r\x12\x0b\n\x03uid\x18\x0f \x01(\x03\x12\r\n\x05width\x18\x12 \x01(\r\x12\x0e\n\x06height\x18\x13 \x01(\r\x12\x12\n\norigin_src\x18\x19 \x01(\t\x12\x13\n\x0borigin_size\x18\x1b \x01(\r\x12\r\n\x05\x63ount\x18\x1c \x01(\x05\x12\x30\n\x0etiebaplus_info\x18( \x01(\x0b\x32\x18.PbContent.TiebaPlusInfo\x12\x1d\n\x04item\x18) \x01(\x0b\x32\x0f.PbContent.Item\x1a\xd2\x01\n\rTiebaPlusInfo\x12\r\n\x05title\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x65sc\x18\x02 \x01(\t\x12\x10\n\x08jump_url\x18\x03 \x01(\t\x12\x10\n\x08\x61pp_icon\x18\x06 \x01(\t\x12\x13\n\x0btarget_type\x18\x0c \x01(\x05\x12\x14\n\x0ch5_jump_type\x18\r \x01(\x05\x12\x16\n\x0eh5_jump_number\x18\x0e \x01(\t\x12\x15\n\rh5_jump_param\x18\x0f \x01(\t\x12\x11\n\tjump_type\x18\x10 \x01(\x05\x12\x13\n\x0b\x62utton_desc\x18\x17 \x01(\t\x1a\x19\n\x04Item\x12\x11\n\titem_name\x18\x02 \x01(\tb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "PbContent_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_PBCONTENT"]._serialized_start = 20
_globals["_PBCONTENT"]._serialized_end = 611
_globals["_PBCONTENT_TIEBAPLUSINFO"]._serialized_start = 374
_globals["_PBCONTENT_TIEBAPLUSINFO"]._serialized_end = 584
_globals["_PBCONTENT_ITEM"]._serialized_start = 586
_globals["_PBCONTENT_ITEM"]._serialized_end = 611
================================================
FILE: src/aiotieba/api/_protobuf/PollInfo.proto
================================================
// tbclient.PollInfo
syntax = "proto3";
message PollInfo {
int32 is_multi = 2;
int64 total_num = 3;
message PollOption {
int64 num = 2;
string text = 3;
}
repeated PollOption options = 9;
int64 total_poll = 11;
string title = 12;
}
================================================
FILE: src/aiotieba/api/_protobuf/PollInfo_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b"\n\x0ePollInfo.proto\"\xa2\x01\n\x08PollInfo\x12\x10\n\x08is_multi\x18\x02 \x01(\x05\x12\x11\n\ttotal_num\x18\x03 \x01(\x03\x12%\n\x07options\x18\t \x03(\x0b\x32\x14.PollInfo.PollOption\x12\x12\n\ntotal_poll\x18\x0b \x01(\x03\x12\r\n\x05title\x18\x0c \x01(\t\x1a'\n\nPollOption\x12\x0b\n\x03num\x18\x02 \x01(\x03\x12\x0c\n\x04text\x18\x03 \x01(\tb\x06proto3"
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "PollInfo_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_POLLINFO"]._serialized_start = 19
_globals["_POLLINFO"]._serialized_end = 181
_globals["_POLLINFO_POLLOPTION"]._serialized_start = 142
_globals["_POLLINFO_POLLOPTION"]._serialized_end = 181
================================================
FILE: src/aiotieba/api/_protobuf/Post.proto
================================================
// tbclient.Post
syntax = "proto3";
import "PbContent.proto";
import "SubPostList.proto";
import "User.proto";
import "Agree.proto";
message Post {
int64 id = 1;
uint32 floor = 3;
uint32 time = 4;
repeated PbContent content = 5;
uint32 sub_post_number = 13;
int64 author_id = 19;
message SubPost {
repeated SubPostList sub_post_list = 2;
}
SubPost sub_post_list = 15;
message SignatureData {
message SignatureContent {
int32 type = 1;
string text = 2;
}
repeated SignatureContent content = 4;
}
SignatureData signature = 21;
User author = 23;
Agree agree = 37;
int64 tid = 46;
message ChatContent {
string bot_uk = 1;
}
ChatContent chat_content = 78;
message SpriteMemeInfo {
int64 meme_id = 1;
}
SpriteMemeInfo sprite_meme_info = 79;
}
================================================
FILE: src/aiotieba/api/_protobuf/PostInfoList.proto
================================================
// tbclient.PostInfoList
syntax = "proto3";
import "Media.proto";
import "Voice.proto";
import "PollInfo.proto";
import "VideoInfo.proto";
import "PbContent.proto";
import "Agree.proto";
message PostInfoList {
uint64 forum_id = 1;
uint64 thread_id = 2;
uint64 post_id = 3;
uint32 create_time = 5;
string forum_name = 6;
string title = 7;
message PostInfoContent {
message Abstract {
int32 type = 1;
string text = 2;
string link = 3;
string during_time = 6;
string voice_md5 = 7;
}
repeated Abstract post_content = 1;
uint64 create_time = 2;
uint64 post_type = 3;
uint64 post_id = 4;
}
repeated PostInfoContent content = 8;
string user_name = 10;
repeated Media media = 16;
uint32 reply_num = 17;
int64 user_id = 18;
string user_portrait = 19;
repeated Voice voice_info = 23;
uint64 thread_type = 26;
PollInfo poll_info = 28;
VideoInfo video_info = 29;
int32 freq_num = 33;
string name_show = 35;
int32 share_num = 39;
Agree agree = 40;
int32 is_share_thread = 44;
repeated PbContent first_post_content = 49;
}
================================================
FILE: src/aiotieba/api/_protobuf/PostInfoList_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from . import Agree_pb2 as Agree__pb2
from . import Media_pb2 as Media__pb2
from . import PbContent_pb2 as PbContent__pb2
from . import PollInfo_pb2 as PollInfo__pb2
from . import VideoInfo_pb2 as VideoInfo__pb2
from . import Voice_pb2 as Voice__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b"\n\x12PostInfoList.proto\x1a\x0bMedia.proto\x1a\x0bVoice.proto\x1a\x0ePollInfo.proto\x1a\x0fVideoInfo.proto\x1a\x0fPbContent.proto\x1a\x0b\x41gree.proto\"\xf9\x05\n\x0cPostInfoList\x12\x10\n\x08\x66orum_id\x18\x01 \x01(\x04\x12\x11\n\tthread_id\x18\x02 \x01(\x04\x12\x0f\n\x07post_id\x18\x03 \x01(\x04\x12\x13\n\x0b\x63reate_time\x18\x05 \x01(\r\x12\x12\n\nforum_name\x18\x06 \x01(\t\x12\r\n\x05title\x18\x07 \x01(\t\x12.\n\x07\x63ontent\x18\x08 \x03(\x0b\x32\x1d.PostInfoList.PostInfoContent\x12\x11\n\tuser_name\x18\n \x01(\t\x12\x15\n\x05media\x18\x10 \x03(\x0b\x32\x06.Media\x12\x11\n\treply_num\x18\x11 \x01(\r\x12\x0f\n\x07user_id\x18\x12 \x01(\x03\x12\x15\n\ruser_portrait\x18\x13 \x01(\t\x12\x1a\n\nvoice_info\x18\x17 \x03(\x0b\x32\x06.Voice\x12\x13\n\x0bthread_type\x18\x1a \x01(\x04\x12\x1c\n\tpoll_info\x18\x1c \x01(\x0b\x32\t.PollInfo\x12\x1e\n\nvideo_info\x18\x1d \x01(\x0b\x32\n.VideoInfo\x12\x10\n\x08\x66req_num\x18! \x01(\x05\x12\x11\n\tname_show\x18# \x01(\t\x12\x11\n\tshare_num\x18' \x01(\x05\x12\x15\n\x05\x61gree\x18( \x01(\x0b\x32\x06.Agree\x12\x17\n\x0fis_share_thread\x18, \x01(\x05\x12&\n\x12\x66irst_post_content\x18\x31 \x03(\x0b\x32\n.PbContent\x1a\xe6\x01\n\x0fPostInfoContent\x12<\n\x0cpost_content\x18\x01 \x03(\x0b\x32&.PostInfoList.PostInfoContent.Abstract\x12\x13\n\x0b\x63reate_time\x18\x02 \x01(\x04\x12\x11\n\tpost_type\x18\x03 \x01(\x04\x12\x0f\n\x07post_id\x18\x04 \x01(\x04\x1a\\\n\x08\x41\x62stract\x12\x0c\n\x04type\x18\x01 \x01(\x05\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x0c\n\x04link\x18\x03 \x01(\t\x12\x13\n\x0b\x64uring_time\x18\x06 \x01(\t\x12\x11\n\tvoice_md5\x18\x07 \x01(\tb\x06proto3"
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "PostInfoList_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_POSTINFOLIST"]._serialized_start = 112
_globals["_POSTINFOLIST"]._serialized_end = 873
_globals["_POSTINFOLIST_POSTINFOCONTENT"]._serialized_start = 643
_globals["_POSTINFOLIST_POSTINFOCONTENT"]._serialized_end = 873
_globals["_POSTINFOLIST_POSTINFOCONTENT_ABSTRACT"]._serialized_start = 781
_globals["_POSTINFOLIST_POSTINFOCONTENT_ABSTRACT"]._serialized_end = 873
================================================
FILE: src/aiotieba/api/_protobuf/Post_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from . import Agree_pb2 as Agree__pb2
from . import PbContent_pb2 as PbContent__pb2
from . import SubPostList_pb2 as SubPostList__pb2
from . import User_pb2 as User__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b"\n\nPost.proto\x1a\x0fPbContent.proto\x1a\x11SubPostList.proto\x1a\nUser.proto\x1a\x0b\x41gree.proto\"\xc4\x04\n\x04Post\x12\n\n\x02id\x18\x01 \x01(\x03\x12\r\n\x05\x66loor\x18\x03 \x01(\r\x12\x0c\n\x04time\x18\x04 \x01(\r\x12\x1b\n\x07\x63ontent\x18\x05 \x03(\x0b\x32\n.PbContent\x12\x17\n\x0fsub_post_number\x18\r \x01(\r\x12\x11\n\tauthor_id\x18\x13 \x01(\x03\x12$\n\rsub_post_list\x18\x0f \x01(\x0b\x32\r.Post.SubPost\x12&\n\tsignature\x18\x15 \x01(\x0b\x32\x13.Post.SignatureData\x12\x15\n\x06\x61uthor\x18\x17 \x01(\x0b\x32\x05.User\x12\x15\n\x05\x61gree\x18% \x01(\x0b\x32\x06.Agree\x12\x0b\n\x03tid\x18. \x01(\x03\x12'\n\x0c\x63hat_content\x18N \x01(\x0b\x32\x11.Post.ChatContent\x12.\n\x10sprite_meme_info\x18O \x01(\x0b\x32\x14.Post.SpriteMemeInfo\x1a.\n\x07SubPost\x12#\n\rsub_post_list\x18\x02 \x03(\x0b\x32\x0c.SubPostList\x1av\n\rSignatureData\x12\x35\n\x07\x63ontent\x18\x04 \x03(\x0b\x32$.Post.SignatureData.SignatureContent\x1a.\n\x10SignatureContent\x12\x0c\n\x04type\x18\x01 \x01(\x05\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a\x1d\n\x0b\x43hatContent\x12\x0e\n\x06\x62ot_uk\x18\x01 \x01(\t\x1a!\n\x0eSpriteMemeInfo\x12\x0f\n\x07meme_id\x18\x01 \x01(\x03\x62\x06proto3"
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "Post_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_POST"]._serialized_start = 76
_globals["_POST"]._serialized_end = 656
_globals["_POST_SUBPOST"]._serialized_start = 424
_globals["_POST_SUBPOST"]._serialized_end = 470
_globals["_POST_SIGNATUREDATA"]._serialized_start = 472
_globals["_POST_SIGNATUREDATA"]._serialized_end = 590
_globals["_POST_SIGNATUREDATA_SIGNATURECONTENT"]._serialized_start = 544
_globals["_POST_SIGNATUREDATA_SIGNATURECONTENT"]._serialized_end = 590
_globals["_POST_CHATCONTENT"]._serialized_start = 592
_globals["_POST_CHATCONTENT"]._serialized_end = 621
_globals["_POST_SPRITEMEMEINFO"]._serialized_start = 623
_globals["_POST_SPRITEMEMEINFO"]._serialized_end = 656
================================================
FILE: src/aiotieba/api/_protobuf/Rpc.proto
================================================
syntax = "proto3";
message ChunkInfo {
int64 stream_id = 1;
int64 chunk_id = 2;
}
message EventTimestamp {
string event = 1;
int64 timestamp_ms = 2;
}
message RpcNotifyMeta {
int64 service_id = 1;
int64 method_id = 2;
int64 log_id = 3;
repeated EventTimestamp event_list = 4;
}
message RpcRequestMeta {
int64 service_id = 1;
int64 method_id = 2;
int64 log_id = 3;
int32 need_common = 4;
repeated EventTimestamp event_list = 5;
}
message RpcResponseMeta {
int64 service_id = 1;
int64 method_id = 2;
int64 log_id = 3;
int32 error_code = 4;
string error_text = 5;
repeated EventTimestamp event_list = 6;
}
message RpcMeta{
RpcRequestMeta request = 1;
RpcResponseMeta response = 2;
optional int32 compress_type = 3;
int64 correlation_id = 4;
int32 attachment_size = 5;
ChunkInfo chunk_info = 6;
bytes authentication_data = 7;
RpcNotifyMeta notify = 8;
int32 accept_compress_type = 9;
}
================================================
FILE: src/aiotieba/api/_protobuf/Rpc_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\tRpc.proto"0\n\tChunkInfo\x12\x11\n\tstream_id\x18\x01 \x01(\x03\x12\x10\n\x08\x63hunk_id\x18\x02 \x01(\x03"5\n\x0e\x45ventTimestamp\x12\r\n\x05\x65vent\x18\x01 \x01(\t\x12\x14\n\x0ctimestamp_ms\x18\x02 \x01(\x03"k\n\rRpcNotifyMeta\x12\x12\n\nservice_id\x18\x01 \x01(\x03\x12\x11\n\tmethod_id\x18\x02 \x01(\x03\x12\x0e\n\x06log_id\x18\x03 \x01(\x03\x12#\n\nevent_list\x18\x04 \x03(\x0b\x32\x0f.EventTimestamp"\x81\x01\n\x0eRpcRequestMeta\x12\x12\n\nservice_id\x18\x01 \x01(\x03\x12\x11\n\tmethod_id\x18\x02 \x01(\x03\x12\x0e\n\x06log_id\x18\x03 \x01(\x03\x12\x13\n\x0bneed_common\x18\x04 \x01(\x05\x12#\n\nevent_list\x18\x05 \x03(\x0b\x32\x0f.EventTimestamp"\x95\x01\n\x0fRpcResponseMeta\x12\x12\n\nservice_id\x18\x01 \x01(\x03\x12\x11\n\tmethod_id\x18\x02 \x01(\x03\x12\x0e\n\x06log_id\x18\x03 \x01(\x03\x12\x12\n\nerror_code\x18\x04 \x01(\x05\x12\x12\n\nerror_text\x18\x05 \x01(\t\x12#\n\nevent_list\x18\x06 \x03(\x0b\x32\x0f.EventTimestamp"\xa9\x02\n\x07RpcMeta\x12 \n\x07request\x18\x01 \x01(\x0b\x32\x0f.RpcRequestMeta\x12"\n\x08response\x18\x02 \x01(\x0b\x32\x10.RpcResponseMeta\x12\x1a\n\rcompress_type\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12\x16\n\x0e\x63orrelation_id\x18\x04 \x01(\x03\x12\x17\n\x0f\x61ttachment_size\x18\x05 \x01(\x05\x12\x1e\n\nchunk_info\x18\x06 \x01(\x0b\x32\n.ChunkInfo\x12\x1b\n\x13\x61uthentication_data\x18\x07 \x01(\x0c\x12\x1e\n\x06notify\x18\x08 \x01(\x0b\x32\x0e.RpcNotifyMeta\x12\x1c\n\x14\x61\x63\x63\x65pt_compress_type\x18\t \x01(\x05\x42\x10\n\x0e_compress_typeb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "Rpc_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_CHUNKINFO"]._serialized_start = 13
_globals["_CHUNKINFO"]._serialized_end = 61
_globals["_EVENTTIMESTAMP"]._serialized_start = 63
_globals["_EVENTTIMESTAMP"]._serialized_end = 116
_globals["_RPCNOTIFYMETA"]._serialized_start = 118
_globals["_RPCNOTIFYMETA"]._serialized_end = 225
_globals["_RPCREQUESTMETA"]._serialized_start = 228
_globals["_RPCREQUESTMETA"]._serialized_end = 357
_globals["_RPCRESPONSEMETA"]._serialized_start = 360
_globals["_RPCRESPONSEMETA"]._serialized_end = 509
_globals["_RPCMETA"]._serialized_start = 512
_globals["_RPCMETA"]._serialized_end = 809
================================================
FILE: src/aiotieba/api/_protobuf/SimpleForum.proto
================================================
// tbclient.SimpleForum
syntax = "proto3";
message SimpleForum {
int64 id = 1;
string name = 2;
string first_class = 7;
string second_class = 8;
int32 member_num = 12;
int32 post_num = 13;
}
================================================
FILE: src/aiotieba/api/_protobuf/SimpleForum_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x11SimpleForum.proto"x\n\x0bSimpleForum\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x66irst_class\x18\x07 \x01(\t\x12\x14\n\x0csecond_class\x18\x08 \x01(\t\x12\x12\n\nmember_num\x18\x0c \x01(\x05\x12\x10\n\x08post_num\x18\r \x01(\x05\x62\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "SimpleForum_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_SIMPLEFORUM"]._serialized_start = 21
_globals["_SIMPLEFORUM"]._serialized_end = 141
================================================
FILE: src/aiotieba/api/_protobuf/SubPostList.proto
================================================
// tbclient.SubPost
syntax = "proto3";
import "PbContent.proto";
import "User.proto";
import "Agree.proto";
message SubPostList {
int64 id = 1;
repeated PbContent content = 2;
uint32 time = 3;
int64 author_id = 4;
string title = 5;
uint32 floor = 6;
User author = 7;
Agree agree = 9;
}
message SubPost {
uint64 pid = 1;
repeated SubPostList sub_post_list = 2;
}
================================================
FILE: src/aiotieba/api/_protobuf/SubPostList_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from . import Agree_pb2 as Agree__pb2
from . import PbContent_pb2 as PbContent__pb2
from . import User_pb2 as User__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x11SubPostList.proto\x1a\x0fPbContent.proto\x1a\nUser.proto\x1a\x0b\x41gree.proto"\xa3\x01\n\x0bSubPostList\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x1b\n\x07\x63ontent\x18\x02 \x03(\x0b\x32\n.PbContent\x12\x0c\n\x04time\x18\x03 \x01(\r\x12\x11\n\tauthor_id\x18\x04 \x01(\x03\x12\r\n\x05title\x18\x05 \x01(\t\x12\r\n\x05\x66loor\x18\x06 \x01(\r\x12\x15\n\x06\x61uthor\x18\x07 \x01(\x0b\x32\x05.User\x12\x15\n\x05\x61gree\x18\t \x01(\x0b\x32\x06.Agree";\n\x07SubPost\x12\x0b\n\x03pid\x18\x01 \x01(\x04\x12#\n\rsub_post_list\x18\x02 \x03(\x0b\x32\x0c.SubPostListb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "SubPostList_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_SUBPOSTLIST"]._serialized_start = 64
_globals["_SUBPOSTLIST"]._serialized_end = 227
_globals["_SUBPOST"]._serialized_start = 229
_globals["_SUBPOST"]._serialized_end = 288
================================================
FILE: src/aiotieba/api/_protobuf/ThreadInfo.proto
================================================
// tbclient.ThreadInfo
syntax = "proto3";
import "User.proto";
import "Voice.proto";
import "PollInfo.proto";
import "VideoInfo.proto";
import "PbContent.proto";
import "Agree.proto";
import "Media.proto";
message ThreadInfo {
int64 id = 1;
string title = 3;
int32 reply_num = 4;
int32 view_num = 5;
int32 last_time_int = 7;
int32 is_top = 9;
int32 is_good = 10;
int32 is_voice_thread = 15;
User author = 18;
User last_replyer = 19;
repeated Voice voice_info = 23;
int32 thread_type = 26;
int64 fid = 27;
string fname = 28;
int32 is_livepost = 30;
int64 first_post_id = 40;
int32 create_time = 45;
int64 post_id = 52;
int64 author_id = 56;
uint32 is_ad = 59;
PollInfo poll_info = 74;
VideoInfo video_info = 79;
int32 is_godthread_recommend = 85;
Agree agree = 126;
int32 share_num = 135;
message OriginThreadInfo {
string title = 1;
repeated Media media = 2;
string fname = 4;
string tid = 5;
int64 fid = 7;
repeated Voice voice_info = 12;
VideoInfo video_info = 13;
repeated PbContent content = 14;
PollInfo poll_info = 21;
int64 pid = 25;
}
OriginThreadInfo origin_thread_info = 141;
repeated PbContent first_post_content = 142;
int32 is_share_thread = 143;
int32 tab_id = 175;
int32 is_deleted = 181;
int32 is_frs_mask = 198;
}
================================================
FILE: src/aiotieba/api/_protobuf/ThreadInfo_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from . import Agree_pb2 as Agree__pb2
from . import Media_pb2 as Media__pb2
from . import PbContent_pb2 as PbContent__pb2
from . import PollInfo_pb2 as PollInfo__pb2
from . import User_pb2 as User__pb2
from . import VideoInfo_pb2 as VideoInfo__pb2
from . import Voice_pb2 as Voice__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b"\n\x10ThreadInfo.proto\x1a\nUser.proto\x1a\x0bVoice.proto\x1a\x0ePollInfo.proto\x1a\x0fVideoInfo.proto\x1a\x0fPbContent.proto\x1a\x0b\x41gree.proto\x1a\x0bMedia.proto\"\xbd\x07\n\nThreadInfo\x12\n\n\x02id\x18\x01 \x01(\x03\x12\r\n\x05title\x18\x03 \x01(\t\x12\x11\n\treply_num\x18\x04 \x01(\x05\x12\x10\n\x08view_num\x18\x05 \x01(\x05\x12\x15\n\rlast_time_int\x18\x07 \x01(\x05\x12\x0e\n\x06is_top\x18\t \x01(\x05\x12\x0f\n\x07is_good\x18\n \x01(\x05\x12\x17\n\x0fis_voice_thread\x18\x0f \x01(\x05\x12\x15\n\x06\x61uthor\x18\x12 \x01(\x0b\x32\x05.User\x12\x1b\n\x0clast_replyer\x18\x13 \x01(\x0b\x32\x05.User\x12\x1a\n\nvoice_info\x18\x17 \x03(\x0b\x32\x06.Voice\x12\x13\n\x0bthread_type\x18\x1a \x01(\x05\x12\x0b\n\x03\x66id\x18\x1b \x01(\x03\x12\r\n\x05\x66name\x18\x1c \x01(\t\x12\x13\n\x0bis_livepost\x18\x1e \x01(\x05\x12\x15\n\rfirst_post_id\x18( \x01(\x03\x12\x13\n\x0b\x63reate_time\x18- \x01(\x05\x12\x0f\n\x07post_id\x18\x34 \x01(\x03\x12\x11\n\tauthor_id\x18\x38 \x01(\x03\x12\r\n\x05is_ad\x18; \x01(\r\x12\x1c\n\tpoll_info\x18J \x01(\x0b\x32\t.PollInfo\x12\x1e\n\nvideo_info\x18O \x01(\x0b\x32\n.VideoInfo\x12\x1e\n\x16is_godthread_recommend\x18U \x01(\x05\x12\x15\n\x05\x61gree\x18~ \x01(\x0b\x32\x06.Agree\x12\x12\n\tshare_num\x18\x87\x01 \x01(\x05\x12\x39\n\x12origin_thread_info\x18\x8d\x01 \x01(\x0b\x32\x1c.ThreadInfo.OriginThreadInfo\x12'\n\x12\x66irst_post_content\x18\x8e\x01 \x03(\x0b\x32\n.PbContent\x12\x18\n\x0fis_share_thread\x18\x8f\x01 \x01(\x05\x12\x0f\n\x06tab_id\x18\xaf\x01 \x01(\x05\x12\x13\n\nis_deleted\x18\xb5\x01 \x01(\x05\x12\x14\n\x0bis_frs_mask\x18\xc6\x01 \x01(\x05\x1a\xe5\x01\n\x10OriginThreadInfo\x12\r\n\x05title\x18\x01 \x01(\t\x12\x15\n\x05media\x18\x02 \x03(\x0b\x32\x06.Media\x12\r\n\x05\x66name\x18\x04 \x01(\t\x12\x0b\n\x03tid\x18\x05 \x01(\t\x12\x0b\n\x03\x66id\x18\x07 \x01(\x03\x12\x1a\n\nvoice_info\x18\x0c \x03(\x0b\x32\x06.Voice\x12\x1e\n\nvideo_info\x18\r \x01(\x0b\x32\n.VideoInfo\x12\x1b\n\x07\x63ontent\x18\x0e \x03(\x0b\x32\n.PbContent\x12\x1c\n\tpoll_info\x18\x15 \x01(\x0b\x32\t.PollInfo\x12\x0b\n\x03pid\x18\x19 \x01(\x03\x62\x06proto3"
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "ThreadInfo_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_THREADINFO"]._serialized_start = 122
_globals["_THREADINFO"]._serialized_end = 1079
_globals["_THREADINFO_ORIGINTHREADINFO"]._serialized_start = 850
_globals["_THREADINFO_ORIGINTHREADINFO"]._serialized_end = 1079
================================================
FILE: src/aiotieba/api/_protobuf/User.proto
================================================
// tbclient.User
syntax = "proto3";
message User {
int64 id = 2;
string name = 3;
string name_show = 4;
string portrait = 5;
message Icon {
string name = 1;
}
repeated Icon iconinfo = 17;
int32 is_coreuser = 20;
int32 level_id = 23;
int32 is_bawu = 25;
string bawu_type = 26;
string BDUSS = 29;
int32 fans_num = 30;
int32 concern_num = 31;
int32 sex = 32;
int32 my_like_num = 33;
string intro = 34;
int32 post_num = 37;
string tb_age = 38;
int32 gender = 42;
message PrivSets {
int32 location = 1;
int32 like = 2;
int32 group = 3;
int32 post = 4;
int32 friend = 5;
int32 live = 6;
int32 reply = 7;
int32 bazhu_show_inside = 8;
int32 bazhu_show_outside = 9;
}
PrivSets priv_sets = 45;
int32 is_friend = 46;
message LikeForumInfo {
string forum_name = 1;
uint64 forum_id = 2;
}
repeated LikeForumInfo likeForum = 47;
int32 is_guanfang = 52;
message UserVipInfo {
uint32 v_status = 1;
uint32 v_level = 5;
}
UserVipInfo vipInfo = 61;
message TshowInfo {
string name = 2;
}
repeated TshowInfo new_tshow_icon = 65;
int32 is_fans = 91;
message NewGodInfo {
int32 status = 1;
uint32 field_id = 2;
string field_name = 3;
}
NewGodInfo new_god_data = 101;
int32 is_default_avatar = 106;
string tieba_uid = 120;
string ip_address = 127;
message UserGrowth {
uint32 level_id = 1;
}
UserGrowth user_growth = 137;
}
================================================
FILE: src/aiotieba/api/_protobuf/User_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\nUser.proto"\xd6\x08\n\x04User\x12\n\n\x02id\x18\x02 \x01(\x03\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\tname_show\x18\x04 \x01(\t\x12\x10\n\x08portrait\x18\x05 \x01(\t\x12\x1c\n\x08iconinfo\x18\x11 \x03(\x0b\x32\n.User.Icon\x12\x13\n\x0bis_coreuser\x18\x14 \x01(\x05\x12\x10\n\x08level_id\x18\x17 \x01(\x05\x12\x0f\n\x07is_bawu\x18\x19 \x01(\x05\x12\x11\n\tbawu_type\x18\x1a \x01(\t\x12\r\n\x05\x42\x44USS\x18\x1d \x01(\t\x12\x10\n\x08\x66\x61ns_num\x18\x1e \x01(\x05\x12\x13\n\x0b\x63oncern_num\x18\x1f \x01(\x05\x12\x0b\n\x03sex\x18 \x01(\x05\x12\x13\n\x0bmy_like_num\x18! \x01(\x05\x12\r\n\x05intro\x18" \x01(\t\x12\x10\n\x08post_num\x18% \x01(\x05\x12\x0e\n\x06tb_age\x18& \x01(\t\x12\x0e\n\x06gender\x18* \x01(\x05\x12!\n\tpriv_sets\x18- \x01(\x0b\x32\x0e.User.PrivSets\x12\x11\n\tis_friend\x18. \x01(\x05\x12&\n\tlikeForum\x18/ \x03(\x0b\x32\x13.User.LikeForumInfo\x12\x13\n\x0bis_guanfang\x18\x34 \x01(\x05\x12"\n\x07vipInfo\x18= \x01(\x0b\x32\x11.User.UserVipInfo\x12\'\n\x0enew_tshow_icon\x18\x41 \x03(\x0b\x32\x0f.User.TshowInfo\x12\x0f\n\x07is_fans\x18[ \x01(\x05\x12&\n\x0cnew_god_data\x18\x65 \x01(\x0b\x32\x10.User.NewGodInfo\x12\x19\n\x11is_default_avatar\x18j \x01(\x05\x12\x11\n\ttieba_uid\x18x \x01(\t\x12\x12\n\nip_address\x18\x7f \x01(\t\x12&\n\x0buser_growth\x18\x89\x01 \x01(\x0b\x32\x10.User.UserGrowth\x1a\x14\n\x04Icon\x12\x0c\n\x04name\x18\x01 \x01(\t\x1a\xab\x01\n\x08PrivSets\x12\x10\n\x08location\x18\x01 \x01(\x05\x12\x0c\n\x04like\x18\x02 \x01(\x05\x12\r\n\x05group\x18\x03 \x01(\x05\x12\x0c\n\x04post\x18\x04 \x01(\x05\x12\x0e\n\x06\x66riend\x18\x05 \x01(\x05\x12\x0c\n\x04live\x18\x06 \x01(\x05\x12\r\n\x05reply\x18\x07 \x01(\x05\x12\x19\n\x11\x62\x61zhu_show_inside\x18\x08 \x01(\x05\x12\x1a\n\x12\x62\x61zhu_show_outside\x18\t \x01(\x05\x1a\x35\n\rLikeForumInfo\x12\x12\n\nforum_name\x18\x01 \x01(\t\x12\x10\n\x08\x66orum_id\x18\x02 \x01(\x04\x1a\x30\n\x0bUserVipInfo\x12\x10\n\x08v_status\x18\x01 \x01(\r\x12\x0f\n\x07v_level\x18\x05 \x01(\r\x1a\x19\n\tTshowInfo\x12\x0c\n\x04name\x18\x02 \x01(\t\x1a\x42\n\nNewGodInfo\x12\x0e\n\x06status\x18\x01 \x01(\x05\x12\x10\n\x08\x66ield_id\x18\x02 \x01(\r\x12\x12\n\nfield_name\x18\x03 \x01(\t\x1a\x1e\n\nUserGrowth\x12\x10\n\x08level_id\x18\x01 \x01(\rb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "User_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_USER"]._serialized_start = 15
_globals["_USER"]._serialized_end = 1125
_globals["_USER_ICON"]._serialized_start = 699
_globals["_USER_ICON"]._serialized_end = 719
_globals["_USER_PRIVSETS"]._serialized_start = 722
_globals["_USER_PRIVSETS"]._serialized_end = 893
_globals["_USER_LIKEFORUMINFO"]._serialized_start = 895
_globals["_USER_LIKEFORUMINFO"]._serialized_end = 948
_globals["_USER_USERVIPINFO"]._serialized_start = 950
_globals["_USER_USERVIPINFO"]._serialized_end = 998
_globals["_USER_TSHOWINFO"]._serialized_start = 1000
_globals["_USER_TSHOWINFO"]._serialized_end = 1025
_globals["_USER_NEWGODINFO"]._serialized_start = 1027
_globals["_USER_NEWGODINFO"]._serialized_end = 1093
_globals["_USER_USERGROWTH"]._serialized_start = 1095
_globals["_USER_USERGROWTH"]._serialized_end = 1125
================================================
FILE: src/aiotieba/api/_protobuf/VideoInfo.proto
================================================
// tbclient.VideoInfo
syntax = "proto3";
message VideoInfo {
string video_url = 2;
uint32 video_duration = 3;
uint32 video_width = 4;
uint32 video_height = 5;
string thumbnail_url = 6;
int32 play_count = 10;
}
================================================
FILE: src/aiotieba/api/_protobuf/VideoInfo_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x0fVideoInfo.proto"\x8c\x01\n\tVideoInfo\x12\x11\n\tvideo_url\x18\x02 \x01(\t\x12\x16\n\x0evideo_duration\x18\x03 \x01(\r\x12\x13\n\x0bvideo_width\x18\x04 \x01(\r\x12\x14\n\x0cvideo_height\x18\x05 \x01(\r\x12\x15\n\rthumbnail_url\x18\x06 \x01(\t\x12\x12\n\nplay_count\x18\n \x01(\x05\x62\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "VideoInfo_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_VIDEOINFO"]._serialized_start = 20
_globals["_VIDEOINFO"]._serialized_end = 160
================================================
FILE: src/aiotieba/api/_protobuf/Voice.proto
================================================
// tbclient.Voice
syntax = "proto3";
message Voice {
int32 during_time = 2;
string voice_md5 = 3;
}
================================================
FILE: src/aiotieba/api/_protobuf/Voice_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x0bVoice.proto"/\n\x05Voice\x12\x13\n\x0b\x64uring_time\x18\x02 \x01(\x05\x12\x11\n\tvoice_md5\x18\x03 \x01(\tb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "Voice_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_VOICE"]._serialized_start = 15
_globals["_VOICE"]._serialized_end = 62
================================================
FILE: src/aiotieba/api/_protobuf/__init__.py
================================================
================================================
FILE: src/aiotieba/api/add_bawu/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/add_bawu/_api.py
================================================
import yarl
from ...const import WEB_BASE_HOST
from ...core import HttpCore
from ...enums import BawuType
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := res_json["no"]:
raise TiebaServerError(code, res_json["error"])
async def request(http_core: HttpCore, fid: int, user_name: str, bawu_type: BawuType) -> BoolResponse:
data = [
("fn", "-"),
("fid", fid),
("team_un", user_name),
("type", bawu_type),
("tbs", http_core.account.tbs),
]
request = http_core.pack_web_form_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/mo/q/bawuteamadd"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=2 * 1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/add_bawu_blacklist/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/add_bawu_blacklist/_api.py
================================================
import yarl
from ...const import WEB_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := res_json["errno"]:
raise TiebaServerError(code, res_json["errmsg"])
async def request(http_core: HttpCore, fname: str, user_id: int) -> BoolResponse:
data = [
("tbs", http_core.account.tbs),
("user_id", user_id),
("word", fname),
("ie", "utf-8"),
]
request = http_core.pack_web_form_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/bawu2/platform/addBlack"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=2 * 1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/add_blacklist_old/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/add_blacklist_old/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
if code := int(res_json["errorno"]):
raise TiebaServerError(code, res_json["errmsg"])
async def request(http_core: HttpCore, user_id: int) -> BoolResponse:
data = [
("BDUSS", http_core.account.BDUSS),
("mute_user", user_id),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/user/userMuteAdd"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/add_post/__init__.py
================================================
from ._api import CMD, pack_proto, parse_body, request_http, request_ws
================================================
FILE: src/aiotieba/api/add_post/_api.py
================================================
import datetime
import time
import yarl
from ...__version__ import __version__
from ...const import APP_BASE_HOST
from ...core import Account, HttpCore, WsCore
from ...exception import BoolResponse, TiebaServerError, TiebaValueError
from .protobuf import AddPostReqIdl_pb2, AddPostResIdl_pb2
CMD = 309731
def parse_body(body: bytes) -> None:
res_proto = AddPostResIdl_pb2.AddPostResIdl()
res_proto.ParseFromString(body)
if code := res_proto.error.errorno:
raise TiebaServerError(code, res_proto.error.errmsg)
if int(res_proto.data.info.need_vcode):
raise TiebaValueError("Need verify code")
def pack_proto(account: Account, fname: str, fid: int, tid: int, show_name: str, content: str) -> bytes:
req_proto = AddPostReqIdl_pb2.AddPostReqIdl()
req_proto.data.common.BDUSS = account.BDUSS
req_proto.data.common._client_type = 2
req_proto.data.common._client_version = "12.35.1.0"
req_proto.data.common._client_id = account.client_id
req_proto.data.common._phone_imei = "000000000000000"
req_proto.data.common._from = "1008621x"
req_proto.data.common.cuid = account.cuid_galaxy2
current_ts = time.time()
current_tsms = int(current_ts * 1000)
current_dt = datetime.datetime.fromtimestamp(current_ts)
req_proto.data.common._timestamp = current_tsms
req_proto.data.common.model = "SM-G988N"
req_proto.data.common.tbs = account.tbs
req_proto.data.common.net_type = 1
req_proto.data.common.pversion = "1.0.3"
req_proto.data.common._os_version = "9"
req_proto.data.common.brand = "samsung"
req_proto.data.common.lego_lib_version = "3.0.0"
req_proto.data.common.applist = ""
req_proto.data.common.stoken = account.STOKEN
req_proto.data.common.z_id = account.z_id
req_proto.data.common.cuid_galaxy2 = account.cuid_galaxy2
req_proto.data.common.cuid_gid = ""
req_proto.data.common.c3_aid = account.c3_aid
req_proto.data.common.sample_id = account.sample_id
req_proto.data.common.scr_w = 720
req_proto.data.common.scr_w = 1280
req_proto.data.common.scr_dip = 1.5
req_proto.data.common.q_type = 0
req_proto.data.common.is_teenager = 0
req_proto.data.common.sdk_ver = "2.34.0"
req_proto.data.common.framework_ver = "3340042"
req_proto.data.common.naws_game_ver = "1038000"
req_proto.data.common.active_timestamp = current_tsms - 86400 * 30
req_proto.data.common.first_install_time = current_tsms - 86400 * 30
req_proto.data.common.last_update_time = current_tsms - 86400 * 30
req_proto.data.common.event_day = f"{current_dt.year}{current_dt.month}{current_dt.day}"
req_proto.data.common.android_id = account.android_id
req_proto.data.common.cmode = 1
req_proto.data.common.start_scheme = ""
req_proto.data.common.start_type = 1
req_proto.data.common.idfv = "0"
req_proto.data.common.extra = ""
req_proto.data.common.user_agent = f"aiotieba/{__version__}"
req_proto.data.common.personalized_rec_switch = 1
req_proto.data.common.device_score = "0.4"
req_proto.data.anonymous = "1"
req_proto.data.can_no_forum = "0"
req_proto.data.is_feedback = "0"
req_proto.data.takephoto_num = "0"
req_proto.data.entrance_type = "0"
req_proto.data.vcode_tag = "12"
req_proto.data.new_vcode = "1"
req_proto.data.content = content
req_proto.data.fid = str(fid)
req_proto.data.v_fid = ""
req_proto.data.v_fname = ""
req_proto.data.kw = fname
req_proto.data.is_barrage = "0"
req_proto.data.from_fourm_id = str(fid)
req_proto.data.tid = str(tid)
req_proto.data.is_ad = "0"
req_proto.data.post_from = "3"
req_proto.data.name_show = show_name
req_proto.data.is_pictxt = "0"
req_proto.data.show_custom_figure = 0
req_proto.data.is_show_bless = 0
return req_proto.SerializeToString()
async def request_http(
http_core: HttpCore, fname: str, fid: int, tid: int, show_name: str, content: str
) -> BoolResponse:
data = pack_proto(http_core.account, fname, fid, tid, show_name, content)
request = http_core.pack_proto_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/post/add", query_string=f"cmd={CMD}"),
data,
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
async def request_ws(ws_core: WsCore, fname: str, fid: int, tid: int, show_name: str, content: str) -> BoolResponse:
data = pack_proto(ws_core.account, fname, fid, tid, show_name, content)
response = await ws_core.send(data, CMD)
parse_body(await response.read())
return BoolResponse()
================================================
FILE: src/aiotieba/api/add_post/protobuf/AddPostReqIdl.proto
================================================
// tbclient.AddPost.AddPostReqIdl
syntax = "proto3";
import "CommonReq.proto";
message AddPostReqIdl {
message DataReq {
CommonReq common = 1;
string anonymous = 6;
string can_no_forum = 7;
string is_feedback = 8;
string takephoto_num = 9;
string entrance_type = 10;
string vcode_tag = 16;
string new_vcode = 18;
string content = 19;
string fid = 26;
string v_fid = 28;
string v_fname = 29;
string kw = 30;
string is_barrage = 31;
string barrage_time = 32;
string from_fourm_id = 44;
string tid = 45;
string is_ad = 51;
string post_from = 55;
string name_show = 58;
string is_pictxt = 60;
int32 show_custom_figure = 64;
int32 is_show_bless = 67;
}
DataReq data = 1;
}
================================================
FILE: src/aiotieba/api/add_post/protobuf/AddPostReqIdl_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from ..._protobuf import CommonReq_pb2 as CommonReq__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x13\x41\x64\x64PostReqIdl.proto\x1a\x0f\x43ommonReq.proto"\x82\x04\n\rAddPostReqIdl\x12$\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x16.AddPostReqIdl.DataReq\x1a\xca\x03\n\x07\x44\x61taReq\x12\x1a\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\n.CommonReq\x12\x11\n\tanonymous\x18\x06 \x01(\t\x12\x14\n\x0c\x63\x61n_no_forum\x18\x07 \x01(\t\x12\x13\n\x0bis_feedback\x18\x08 \x01(\t\x12\x15\n\rtakephoto_num\x18\t \x01(\t\x12\x15\n\rentrance_type\x18\n \x01(\t\x12\x11\n\tvcode_tag\x18\x10 \x01(\t\x12\x11\n\tnew_vcode\x18\x12 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x13 \x01(\t\x12\x0b\n\x03\x66id\x18\x1a \x01(\t\x12\r\n\x05v_fid\x18\x1c \x01(\t\x12\x0f\n\x07v_fname\x18\x1d \x01(\t\x12\n\n\x02kw\x18\x1e \x01(\t\x12\x12\n\nis_barrage\x18\x1f \x01(\t\x12\x14\n\x0c\x62\x61rrage_time\x18 \x01(\t\x12\x15\n\rfrom_fourm_id\x18, \x01(\t\x12\x0b\n\x03tid\x18- \x01(\t\x12\r\n\x05is_ad\x18\x33 \x01(\t\x12\x11\n\tpost_from\x18\x37 \x01(\t\x12\x11\n\tname_show\x18: \x01(\t\x12\x11\n\tis_pictxt\x18< \x01(\t\x12\x1a\n\x12show_custom_figure\x18@ \x01(\x05\x12\x15\n\ris_show_bless\x18\x43 \x01(\x05\x62\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "AddPostReqIdl_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_ADDPOSTREQIDL"]._serialized_start = 41
_globals["_ADDPOSTREQIDL"]._serialized_end = 555
_globals["_ADDPOSTREQIDL_DATAREQ"]._serialized_start = 97
_globals["_ADDPOSTREQIDL_DATAREQ"]._serialized_end = 555
================================================
FILE: src/aiotieba/api/add_post/protobuf/AddPostResIdl.proto
================================================
// tbclient.AddPost.AddPostResIdl
syntax = "proto3";
import "Error.proto";
message AddPostResIdl {
Error error = 1;
message DataRes {
string video_id = 4;
string msg = 5;
string pre_msg = 6;
string color_msg = 7;
message PostAntiInfo {
string need_vcode = 3;
}
PostAntiInfo info = 14;
}
DataRes data = 2;
}
================================================
FILE: src/aiotieba/api/add_post/protobuf/AddPostResIdl_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from ..._protobuf import Error_pb2 as Error__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x13\x41\x64\x64PostResIdl.proto\x1a\x0b\x45rror.proto"\xf2\x01\n\rAddPostResIdl\x12\x15\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x06.Error\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.AddPostResIdl.DataRes\x1a\xa3\x01\n\x07\x44\x61taRes\x12\x10\n\x08video_id\x18\x04 \x01(\t\x12\x0b\n\x03msg\x18\x05 \x01(\t\x12\x0f\n\x07pre_msg\x18\x06 \x01(\t\x12\x11\n\tcolor_msg\x18\x07 \x01(\t\x12\x31\n\x04info\x18\x0e \x01(\x0b\x32#.AddPostResIdl.DataRes.PostAntiInfo\x1a"\n\x0cPostAntiInfo\x12\x12\n\nneed_vcode\x18\x03 \x01(\tb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "AddPostResIdl_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_ADDPOSTRESIDL"]._serialized_start = 37
_globals["_ADDPOSTRESIDL"]._serialized_end = 279
_globals["_ADDPOSTRESIDL_DATARES"]._serialized_start = 116
_globals["_ADDPOSTRESIDL_DATARES"]._serialized_end = 279
_globals["_ADDPOSTRESIDL_DATARES_POSTANTIINFO"]._serialized_start = 245
_globals["_ADDPOSTRESIDL_DATARES_POSTANTIINFO"]._serialized_end = 279
================================================
FILE: src/aiotieba/api/agree/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/agree/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST, LATEST_VERSION
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
async def request(
http_core: HttpCore, tid: int, pid: int, is_comment: bool, is_disagree: bool, is_undo: bool
) -> BoolResponse:
if pid:
obj_type = 2 if is_comment else 1
else:
obj_type = 3
data = [
("BDUSS", http_core.account.BDUSS),
("_client_version", LATEST_VERSION),
("agree_type", 5 if is_disagree else 2),
("cuid", http_core.account.cuid_galaxy2),
("obj_type", obj_type),
("op_type", str(int(is_undo))),
("post_id", pid),
("tbs", http_core.account.tbs),
("thread_id", tid),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/agree/opAgree"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/block/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/block/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
async def request(http_core: HttpCore, fid: int, portrait: str, day: int, reason: str) -> BoolResponse:
is_svip_block = 0 if day in [1, 3, 10] else 1
data = [
("BDUSS", http_core.account.BDUSS),
("day", day),
("fid", fid),
("is_loop_ban", is_svip_block),
("ntn", "banid"),
("portrait", portrait),
("reason", reason),
("tbs", http_core.account.tbs),
("word", "-"),
("z", 6),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/bawu/commitprison"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/del_bawu/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/del_bawu/_api.py
================================================
import yarl
from ...const import WEB_BASE_HOST
from ...core import HttpCore
from ...enums import BawuType
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := res_json["no"]:
raise TiebaServerError(code, res_json["error"])
async def request(http_core: HttpCore, fid: int, portrait: str, bawu_type: BawuType) -> BoolResponse:
data = [
("fn", "-"),
("fid", fid),
("team_un", "-"),
("team_uid", portrait),
("bawu_type", bawu_type),
]
request = http_core.pack_web_form_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/mo/q/bawuteamclear"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=2 * 1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/del_bawu_blacklist/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/del_bawu_blacklist/_api.py
================================================
import yarl
from ...const import WEB_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := res_json["errno"]:
raise TiebaServerError(code, res_json["errmsg"])
async def request(http_core: HttpCore, fname: str, user_id: int) -> BoolResponse:
data = [
("word", fname),
("tbs", http_core.account.tbs),
("list[]", user_id),
("ie", "utf-8"),
]
request = http_core.pack_web_form_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/bawu2/platform/cancelBlack"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=2 * 1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/del_blacklist_old/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/del_blacklist_old/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
if code := int(res_json["errorno"]):
raise TiebaServerError(code, res_json["errmsg"])
async def request(http_core: HttpCore, user_id: int) -> BoolResponse:
data = [
("BDUSS", http_core.account.BDUSS),
("mute_user", user_id),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/user/userMuteDel"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/del_post/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/del_post/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
async def request(http_core: HttpCore, fid: int, tid: int, pid: int) -> BoolResponse:
data = [
("BDUSS", http_core.account.BDUSS),
("fid", fid),
("pid", pid),
("tbs", http_core.account.tbs),
("z", tid),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/bawu/delpost"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/del_posts/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/del_posts/_api.py
================================================
from __future__ import annotations
from typing import TYPE_CHECKING
import yarl
from ...const import APP_BASE_HOST
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
if TYPE_CHECKING:
from ...core import HttpCore
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
async def request(http_core: HttpCore, fid: int, tid: int, pids: list[int], block: bool) -> BoolResponse:
data = [
("BDUSS", http_core.account.BDUSS),
("forum_id", fid),
("post_ids", ",".join(map(str, pids))),
("tbs", http_core.account.tbs),
("thread_id", tid),
("type", 2 if block else 1),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/bawu/multiDelPost"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/del_thread/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/del_thread/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
async def request(http_core: HttpCore, fid: int, tid: int, is_hide: bool) -> BoolResponse:
data = [
("BDUSS", http_core.account.BDUSS),
("fid", fid),
("is_frs_mask", int(is_hide)),
("tbs", http_core.account.tbs),
("z", tid),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/bawu/delthread"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/del_threads/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/del_threads/_api.py
================================================
from __future__ import annotations
from typing import TYPE_CHECKING
import yarl
from ...const import APP_BASE_HOST
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
if TYPE_CHECKING:
from ...core import HttpCore
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
async def request(http_core: HttpCore, fid: int, tids: list[int], block: bool) -> BoolResponse:
data = [
("BDUSS", http_core.account.BDUSS),
("forum_id", fid),
("tbs", http_core.account.tbs),
("thread_ids", ",".join(map(str, tids))),
("type", 2 if block else 1),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/bawu/multiDelThread"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/dislike_forum/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/dislike_forum/_api.py
================================================
import time
import yarl
from ...const import APP_BASE_HOST, LATEST_VERSION
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import pack_json, parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
async def request(http_core: HttpCore, fid: int) -> BoolResponse:
data = [
("BDUSS", http_core.account.BDUSS),
("_client_version", LATEST_VERSION),
(
"dislike",
pack_json([{"tid": 1, "dislike_ids": 7, "fid": fid, "click_time": int(time.time() * 1000)}]),
),
("dislike_from", "homepage"),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/excellent/submitDislike"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/follow_forum/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/follow_forum/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
if "error" in res_json and (code := int(res_json["error"]["errno"])):
raise TiebaServerError(code, res_json["error"]["errmsg"])
async def request(http_core: HttpCore, fid: int) -> BoolResponse:
data = [
("BDUSS", http_core.account.BDUSS),
("fid", fid),
("tbs", http_core.account.tbs),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/forum/like"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=2 * 1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/follow_user/__init__.py
================================================
from ._api import parse_body, request
================================================
FILE: src/aiotieba/api/follow_user/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
def parse_body(body: bytes) -> None:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
async def request(http_core: HttpCore, portrait: str) -> BoolResponse:
data = [
("BDUSS", http_core.account.BDUSS),
("portrait", portrait),
("tbs", http_core.account.tbs),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/user/follow"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
parse_body(body)
return BoolResponse()
================================================
FILE: src/aiotieba/api/get_ats/__init__.py
================================================
from ._api import parse_body, request
from ._classdef import At, Ats
================================================
FILE: src/aiotieba/api/get_ats/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST, LATEST_VERSION
from ...core import HttpCore
from ...exception import TiebaServerError
from ...helper import parse_json
from ._classdef import Ats
def parse_body(body: bytes) -> Ats:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
ats = Ats.from_json(res_json)
return ats
async def request(http_core: HttpCore, pn: int) -> Ats:
data = [
("BDUSS", http_core.account.BDUSS),
("_client_version", LATEST_VERSION),
("pn", pn),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/u/feed/atme"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=1024)
return parse_body(body)
================================================
FILE: src/aiotieba/api/get_ats/_classdef.py
================================================
from __future__ import annotations
import dataclasses as dcs
from functools import cached_property
from typing import TYPE_CHECKING
from ...enums import PrivLike, PrivReply
from ...exception import TbErrorExt
from .._classdef import Containers
if TYPE_CHECKING:
from collections.abc import Mapping
@dcs.dataclass
class Page_at:
"""
页信息
Attributes:
current_page (int): 当前页码
has_more (bool): 是否有后继页
has_prev (bool): 是否有前驱页
"""
current_page: int = 0
has_more: bool = False
has_prev: int = False
@staticmethod
def from_json(data_map: Mapping) -> Page_at:
current_page = int(data_map["current_page"])
has_more = bool(int(data_map["has_more"]))
has_prev = bool(int(data_map["has_prev"]))
return Page_at(current_page, has_more, has_prev)
@dcs.dataclass
class UserInfo_at:
"""
用户信息
Attributes:
user_id (int): user_id
portrait (str): portrait
user_name (str): 用户名
nick_name_new (str): 新版昵称
priv_like (PrivLike): 关注吧列表的公开状态
priv_reply (PrivReply): 帖子评论权限
nick_name (str): 用户昵称
show_name (str): 显示名称
log_name (str): 用于在日志中记录用户信息
"""
user_id: int = 0
portrait: str = ""
user_name: str = ""
nick_name_new: str = ""
priv_like: PrivLike = PrivLike.PUBLIC
priv_reply: PrivReply = PrivReply.ALL
@staticmethod
def from_json(data_map: Mapping) -> UserInfo_at:
user_id = int(data_map["id"])
portrait = data_map["portrait"]
if "?" in portrait:
portrait = portrait[:-13]
user_name = data_map["name"]
nick_name_new = data_map["name_show"]
if priv_sets := data_map["priv_sets"]:
priv_like = PrivLike(int(priv_sets.get("like", 1)))
priv_reply = PrivReply(int(priv_sets.get("reply", 1)))
else:
priv_like = PrivLike.PUBLIC
priv_reply = PrivReply.ALL
return UserInfo_at(user_id, portrait, user_name, nick_name_new, priv_like, priv_reply)
def __str__(self) -> str:
return self.user_name or self.portrait or str(self.user_id)
def __eq__(self, obj: UserInfo_at) -> bool:
return self.user_id == obj.user_id
def __hash__(self) -> int:
return self.user_id
def __bool__(self) -> bool:
return bool(self.user_id)
@property
def nick_name(self) -> str:
return self.nick_name_new
@property
def show_name(self) -> str:
return self.nick_name_new or self.user_name
@cached_property
def log_name(self) -> str:
if self.user_name:
return self.user_name
elif self.portrait:
return f"{self.nick_name_new}/{self.portrait}"
else:
return str(self.user_id)
@dcs.dataclass
class At:
"""
@信息
Attributes:
text (str): 文本内容
fname (str): 所在贴吧名
tid (int): 所在主题帖id
pid (int): 回复id
user (UserInfo_at): 发布者的用户信息
author_id (int): 发布者的user_id
is_comment (bool): 是否楼中楼
is_thread (bool): 是否主题帖
create_time (int): 创建时间
"""
text: str = ""
fname: str = ""
tid: int = 0
pid: int = 0
user: UserInfo_at = dcs.field(default_factory=UserInfo_at)
is_comment: bool = False
is_thread: bool = False
create_time: int = 0
@staticmethod
def from_json(data_map: Mapping) -> At:
text = data_map["content"]
fname = data_map["fname"]
tid = int(data_map["thread_id"])
pid = int(data_map["post_id"])
user = UserInfo_at.from_json(data_map["replyer"])
is_comment = bool(int(data_map["is_floor"]))
is_thread = bool(int(data_map["is_first_post"]))
create_time = int(data_map["time"])
return At(text, fname, tid, pid, user, is_comment, is_thread, create_time)
def __eq__(self, obj: At) -> bool:
return self.pid == obj.pid
def __hash__(self) -> int:
return self.pid
@property
def author_id(self) -> int:
return self.user.user_id
@dcs.dataclass
class Ats(TbErrorExt, Containers[At]):
"""
@信息列表
Attributes:
objs (list[At]): @信息列表
err (Exception | None): 捕获的异常
page (Page_at): 页信息
has_more (bool): 是否还有下一页
"""
page: Page_at = dcs.field(default_factory=Page_at)
@staticmethod
def from_json(data_map: Mapping) -> Ats:
objs = [At.from_json(m) for m in data_map.get("at_list", [])]
page = Page_at.from_json(data_map["page"])
return Ats(objs, page)
@property
def has_more(self) -> bool:
return self.page.has_more
================================================
FILE: src/aiotieba/api/get_bawu_blacklist/__init__.py
================================================
from ._api import parse_body, request
from ._classdef import BawuBlacklistUser, BawuBlacklistUsers
================================================
FILE: src/aiotieba/api/get_bawu_blacklist/_api.py
================================================
import bs4
import yarl
from ...const import WEB_BASE_HOST
from ...core import HttpCore
from ._classdef import BawuBlacklistUsers
def parse_body(body: bytes) -> BawuBlacklistUsers:
soup = bs4.BeautifulSoup(body, "lxml")
bawu_blacklist_users = BawuBlacklistUsers.from_xml(soup)
return bawu_blacklist_users
async def request(http_core: HttpCore, fname: str, pn: int) -> BawuBlacklistUsers:
params = [
("word", fname),
("pn", pn),
]
request = http_core.pack_web_get_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/bawu2/platform/listBlackUser"), params
)
body = await http_core.net_core.send_request(request, read_bufsize=16 * 1024)
return parse_body(body)
================================================
FILE: src/aiotieba/api/get_bawu_blacklist/_classdef.py
================================================
from __future__ import annotations
import dataclasses as dcs
from typing import TYPE_CHECKING
from ...exception import TbErrorExt
from .._classdef import Containers
if TYPE_CHECKING:
import bs4
@dcs.dataclass
class BawuBlacklistUser:
"""
用户信息
Attributes:
user_id (int): user_id
portrait (str): portrait
user_name (str): 用户名
log_name (str): 用于在日志中记录用户信息
"""
user_id: int = 0
portrait: str = ""
user_name: str = ""
@staticmethod
def from_xml(data_tag: bs4.element.Tag) -> BawuBlacklistUser:
user_info_item = data_tag.previous_sibling.input
user_name = user_info_item["data-user-name"]
user_id = int(user_info_item["data-user-id"])
portrait = data_tag.a["href"][14:-17]
return BawuBlacklistUser(user_id, portrait, user_name)
def __str__(self) -> str:
return self.user_name or self.portrait or str(self.user_id)
def __eq__(self, obj: BawuBlacklistUser) -> bool:
return self.user_id == obj.user_id
def __hash__(self) -> int:
return self.user_id
def __bool__(self) -> bool:
return bool(self.user_id)
@property
def log_name(self) -> str:
return str(self)
@dcs.dataclass
class Page_bwblacklist:
"""
页信息
Attributes:
current_page (int): 当前页码
total_page (int): 总页码
total_count (int): 总计数
has_more (bool): 是否有后继页
has_prev (bool): 是否有前驱页
"""
current_page: int = 0
total_page: int = 0
total_count: int = 0
has_more: bool = False
has_prev: bool = False
def from_xml(data_soup: bs4.BeautifulSoup) -> Page_bwblacklist:
total_count_tag = data_soup.find("div", class_="breadcrumbs")
total_count = int(total_count_tag.em.text)
page_tag = data_soup.find("div", class_="tbui_pagination").find("li", class_="active")
if page_tag is None:
if total_count != 0:
current_page = 1
total_page = 1
else:
current_page = 0
total_page = 0
else:
current_page = int(page_tag.text)
total_page_item = page_tag.parent.next_sibling
total_page = int(total_page_item.text[1:-1])
has_more = current_page < total_page
has_prev = current_page > 1
return Page_bwblacklist(current_page, total_page, total_count, has_more, has_prev)
@dcs.dataclass
class BawuBlacklistUsers(TbErrorExt, Containers[BawuBlacklistUser]):
"""
吧务黑名单列表
Attributes:
objs (list[BawuBlacklistUser]): 吧务黑名单列表
err (Exception | None): 捕获的异常
page (Page_bwblacklist): 页信息
has_more (bool): 是否还有下一页
"""
page: Page_bwblacklist = dcs.field(default_factory=Page_bwblacklist)
@staticmethod
def from_xml(data_soup: bs4.BeautifulSoup) -> BawuBlacklistUsers:
objs = [BawuBlacklistUser.from_xml(t) for t in data_soup("td", class_="left_cell")]
page = Page_bwblacklist.from_xml(data_soup)
return BawuBlacklistUsers(objs, page)
@property
def has_more(self) -> bool:
return self.page.has_more
================================================
FILE: src/aiotieba/api/get_bawu_info/__init__.py
================================================
from ._api import CMD, pack_proto, parse_body, request_http, request_ws
from ._classdef import BawuInfo, UserInfo_bawu
================================================
FILE: src/aiotieba/api/get_bawu_info/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST, LATEST_VERSION
from ...core import HttpCore, WsCore
from ...exception import TiebaServerError
from ._classdef import BawuInfo
from .protobuf import GetBawuInfoReqIdl_pb2, GetBawuInfoResIdl_pb2
CMD = 301007
def pack_proto(fid: int) -> bytes:
req_proto = GetBawuInfoReqIdl_pb2.GetBawuInfoReqIdl()
req_proto.data.common._client_version = LATEST_VERSION
req_proto.data.fid = fid
return req_proto.SerializeToString()
def parse_body(body: bytes) -> BawuInfo:
res_proto = GetBawuInfoResIdl_pb2.GetBawuInfoResIdl()
res_proto.ParseFromString(body)
if code := res_proto.error.errorno:
raise TiebaServerError(code, res_proto.error.errmsg)
data_proto = res_proto.data
bawu_info = BawuInfo.from_proto(data_proto)
return bawu_info
async def request_http(http_core: HttpCore, fid: int) -> BawuInfo:
data = pack_proto(fid)
request = http_core.pack_proto_request(
yarl.URL.build(scheme="http", host=APP_BASE_HOST, path="/c/f/forum/getBawuInfo", query_string=f"cmd={CMD}"),
data,
)
body = await http_core.net_core.send_request(request, read_bufsize=8 * 1024)
return parse_body(body)
async def request_ws(ws_core: WsCore, fid: int) -> BawuInfo:
data = pack_proto(fid)
response = await ws_core.send(data, CMD)
return parse_body(await response.read())
================================================
FILE: src/aiotieba/api/get_bawu_info/_classdef.py
================================================
from __future__ import annotations
import dataclasses as dcs
from functools import cached_property
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .._classdef import TypeMessage
@dcs.dataclass
class UserInfo_bawu:
"""
用户信息
Attributes:
user_id (int): user_id
portrait (str): portrait
user_name (str): 用户名
nick_name_new (str): 新版昵称
level (int): 等级
nick_name (str): 用户昵称
show_name (str): 显示名称
log_name (str): 用于在日志中记录用户信息
"""
user_id: int = 0
portrait: str = ""
user_name: str = ""
nick_name_new: str = ""
level: int = 0
@staticmethod
def from_proto(data_proto: TypeMessage) -> UserInfo_bawu:
user_id = data_proto.user_id
portrait = data_proto.portrait
user_name = data_proto.user_name
nick_name_new = data_proto.name_show
level = data_proto.user_level
return UserInfo_bawu(user_id, portrait, user_name, nick_name_new, level)
def __str__(self) -> str:
return self.user_name or self.portrait or str(self.user_id)
def __eq__(self, obj: UserInfo_bawu) -> bool:
return self.user_id == obj.user_id
def __hash__(self) -> int:
return self.user_id
def __bool__(self) -> bool:
return bool(self.user_id)
@property
def nick_name(self) -> str:
return self.nick_name_new
@property
def show_name(self) -> str:
return self.nick_name_new or self.user_name
@cached_property
def log_name(self) -> str:
if self.user_name:
return self.user_name
elif self.portrait:
return f"{self.nick_name_new}/{self.portrait}"
else:
return str(self.user_id)
@dcs.dataclass
class BawuInfo:
"""
吧务团队信息
Attributes:
all (list[UserInfo_bawu]): 所有吧务
admin (list[UserInfo_bawu]): 大吧主
manager (list[UserInfo_bawu]): 小吧主
voice_editor (list[UserInfo_bawu]): 语音小编
image_editor (list[UserInfo_bawu]): 图片小编
video_editor (list[UserInfo_bawu]): 视频小编
broadcast_editor (list[UserInfo_bawu]): 广播小编
journal_chief_editor (list[UserInfo_bawu]): 吧刊主编
journal_editor (list[UserInfo_bawu]): 吧刊小编
profess_admin (list[UserInfo_bawu]): 职业吧主
fourth_admin (list[UserInfo_bawu]): 第四吧主
"""
all: list[UserInfo_bawu] = dcs.field(default_factory=list, repr=False)
admin: list[UserInfo_bawu] = dcs.field(default_factory=list)
manager: list[UserInfo_bawu] = dcs.field(default_factory=list)
voice_editor: list[UserInfo_bawu] = dcs.field(default_factory=list)
image_editor: list[UserInfo_bawu] = dcs.field(default_factory=list)
video_editor: list[UserInfo_bawu] = dcs.field(default_factory=list)
broadcast_editor: list[UserInfo_bawu] = dcs.field(default_factory=list)
journal_chief_editor: list[UserInfo_bawu] = dcs.field(default_factory=list)
journal_editor: list[UserInfo_bawu] = dcs.field(default_factory=list)
profess_admin: list[UserInfo_bawu] = dcs.field(default_factory=list)
fourth_admin: list[UserInfo_bawu] = dcs.field(default_factory=list)
@staticmethod
def from_proto(data_proto: TypeMessage) -> BawuInfo:
all_ = []
r_protos = data_proto.bawu_team_info.bawu_team_list
_dict = {r_proto.role_name: [UserInfo_bawu.from_proto(p) for p in r_proto.role_info] for r_proto in r_protos}
def extract(role_name: str) -> list[UserInfo_bawu]:
if users := _dict.get(role_name):
all_.extend(users)
else:
users = []
return users
admin = extract("吧主")
manager = extract("小吧主")
voice_editor = extract("语音小编")
image_editor = extract("图片小编")
video_editor = extract("视频小编")
broadcast_editor = extract("广播小编")
journal_chief_editor = extract("吧刊主编")
journal_editor = extract("吧刊小编")
profess_admin = extract("职业吧主")
fourth_admin = extract("第四吧主")
return BawuInfo(
all_,
admin,
manager,
voice_editor,
image_editor,
video_editor,
broadcast_editor,
journal_chief_editor,
journal_editor,
profess_admin,
fourth_admin,
)
================================================
FILE: src/aiotieba/api/get_bawu_info/protobuf/GetBawuInfoReqIdl.proto
================================================
// tbclient.GetBawuInfo.GetBawuInfoReqIdl
syntax = "proto3";
import "CommonReq.proto";
message GetBawuInfoReqIdl {
message DataReq {
CommonReq common = 1;
uint64 fid = 2;
}
DataReq data = 1;
}
================================================
FILE: src/aiotieba/api/get_bawu_info/protobuf/GetBawuInfoReqIdl_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from ..._protobuf import CommonReq_pb2 as CommonReq__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x17GetBawuInfoReqIdl.proto\x1a\x0f\x43ommonReq.proto"q\n\x11GetBawuInfoReqIdl\x12(\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x1a.GetBawuInfoReqIdl.DataReq\x1a\x32\n\x07\x44\x61taReq\x12\x1a\n\x06\x63ommon\x18\x01 \x01(\x0b\x32\n.CommonReq\x12\x0b\n\x03\x66id\x18\x02 \x01(\x04\x62\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "GetBawuInfoReqIdl_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_GETBAWUINFOREQIDL"]._serialized_start = 44
_globals["_GETBAWUINFOREQIDL"]._serialized_end = 157
_globals["_GETBAWUINFOREQIDL_DATAREQ"]._serialized_start = 107
_globals["_GETBAWUINFOREQIDL_DATAREQ"]._serialized_end = 157
================================================
FILE: src/aiotieba/api/get_bawu_info/protobuf/GetBawuInfoResIdl.proto
================================================
// tbclient.GetBawuInfo.GetBawuInfoResIdl
syntax = "proto3";
import "Error.proto";
message GetBawuInfoResIdl {
message DataRes {
message BawuTeam {
int32 total_num = 1;
message BawuRoleDes {
string role_name = 1;
message BawuRoleInfoPub {
int64 user_id = 2;
string portrait = 5;
int32 user_level = 6;
string user_name = 8;
string name_show = 9;
}
repeated BawuRoleInfoPub role_info = 2;
}
repeated BawuRoleDes bawu_team_list = 2;
}
BawuTeam bawu_team_info = 1;
}
DataRes data = 1;
Error error = 2;
}
================================================
FILE: src/aiotieba/api/get_bawu_info/protobuf/GetBawuInfoResIdl_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from ..._protobuf import Error_pb2 as Error__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x17GetBawuInfoResIdl.proto\x1a\x0b\x45rror.proto"\xed\x03\n\x11GetBawuInfoResIdl\x12(\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x1a.GetBawuInfoResIdl.DataRes\x12\x15\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x06.Error\x1a\x96\x03\n\x07\x44\x61taRes\x12;\n\x0e\x62\x61wu_team_info\x18\x01 \x01(\x0b\x32#.GetBawuInfoResIdl.DataRes.BawuTeam\x1a\xcd\x02\n\x08\x42\x61wuTeam\x12\x11\n\ttotal_num\x18\x01 \x01(\x05\x12G\n\x0e\x62\x61wu_team_list\x18\x02 \x03(\x0b\x32/.GetBawuInfoResIdl.DataRes.BawuTeam.BawuRoleDes\x1a\xe4\x01\n\x0b\x42\x61wuRoleDes\x12\x11\n\trole_name\x18\x01 \x01(\t\x12R\n\trole_info\x18\x02 \x03(\x0b\x32?.GetBawuInfoResIdl.DataRes.BawuTeam.BawuRoleDes.BawuRoleInfoPub\x1an\n\x0f\x42\x61wuRoleInfoPub\x12\x0f\n\x07user_id\x18\x02 \x01(\x03\x12\x10\n\x08portrait\x18\x05 \x01(\t\x12\x12\n\nuser_level\x18\x06 \x01(\x05\x12\x11\n\tuser_name\x18\x08 \x01(\t\x12\x11\n\tname_show\x18\t \x01(\tb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "GetBawuInfoResIdl_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_GETBAWUINFORESIDL"]._serialized_start = 41
_globals["_GETBAWUINFORESIDL"]._serialized_end = 534
_globals["_GETBAWUINFORESIDL_DATARES"]._serialized_start = 128
_globals["_GETBAWUINFORESIDL_DATARES"]._serialized_end = 534
_globals["_GETBAWUINFORESIDL_DATARES_BAWUTEAM"]._serialized_start = 201
_globals["_GETBAWUINFORESIDL_DATARES_BAWUTEAM"]._serialized_end = 534
_globals["_GETBAWUINFORESIDL_DATARES_BAWUTEAM_BAWUROLEDES"]._serialized_start = 306
_globals["_GETBAWUINFORESIDL_DATARES_BAWUTEAM_BAWUROLEDES"]._serialized_end = 534
_globals["_GETBAWUINFORESIDL_DATARES_BAWUTEAM_BAWUROLEDES_BAWUROLEINFOPUB"]._serialized_start = 424
_globals["_GETBAWUINFORESIDL_DATARES_BAWUTEAM_BAWUROLEDES_BAWUROLEINFOPUB"]._serialized_end = 534
================================================
FILE: src/aiotieba/api/get_bawu_perm/__init__.py
================================================
from ._api import parse_body, request
from ._classdef import BawuPerm
================================================
FILE: src/aiotieba/api/get_bawu_perm/_api.py
================================================
import yarl
from ...const import WEB_BASE_HOST
from ...core import HttpCore
from ...exception import TiebaServerError
from ...helper import parse_json
from ._classdef import BawuPerm
def parse_body(body: bytes) -> BawuPerm:
res_json = parse_json(body)
if code := res_json["no"]:
raise TiebaServerError(code, res_json["error"])
data_map = res_json["data"]
perm = BawuPerm.from_json(data_map)
return perm
async def request(http_core: HttpCore, fid: int, portrait: str) -> BawuPerm:
params = [
("forum_id", fid),
("portrait", portrait),
]
request = http_core.pack_web_get_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/mo/q/getAuthToolPerm"), params
)
body = await http_core.net_core.send_request(request, read_bufsize=2 * 1024)
return parse_body(body)
================================================
FILE: src/aiotieba/api/get_bawu_perm/_classdef.py
================================================
from __future__ import annotations
import dataclasses as dcs
from typing import TYPE_CHECKING
from ...enums import BawuPermType
from ...exception import TbErrorExt
if TYPE_CHECKING:
from collections.abc import Mapping
@dcs.dataclass
class BawuPerm(TbErrorExt):
"""
吧务已分配的权限
Attributes:
err (Exception | None): 捕获的异常
perms (BawuPermType): 吧务已分配的权限
"""
perms: BawuPermType = BawuPermType.NULL
def from_json(data_map: Mapping) -> BawuPerm:
perms = BawuPermType.NULL
for cate in ["category_user", "category_thread"]:
perm_setting = data_map["perm_setting"]
for unblock_perm_dict in perm_setting[cate]:
if not unblock_perm_dict["switch"]:
continue
perm_idx: int = unblock_perm_dict["perm"] - 2
perm = [
BawuPermType.RECOVER_APPEAL,
BawuPermType.RECOVER,
BawuPermType.UNBLOCK,
BawuPermType.UNBLOCK_APPEAL,
][perm_idx]
perms |= perm
return BawuPerm(perms)
================================================
FILE: src/aiotieba/api/get_bawu_postlogs/__init__.py
================================================
from ._api import parse_body, request
from ._classdef import Postlog, Postlogs
================================================
FILE: src/aiotieba/api/get_bawu_postlogs/_api.py
================================================
from __future__ import annotations
import time
from typing import TYPE_CHECKING
from urllib.parse import quote
import bs4
import yarl
from ...const import WEB_BASE_HOST
from ...enums import BawuSearchType
from ._classdef import Postlogs
if TYPE_CHECKING:
import datetime
from ...core import HttpCore
def parse_body(body: bytes) -> Postlogs:
soup = bs4.BeautifulSoup(body, "lxml")
bawu_postlogs = Postlogs.from_xml(soup)
return bawu_postlogs
async def request(
http_core: HttpCore,
fname: str,
pn: int,
search_value: str,
search_type: BawuSearchType,
start_dt: datetime.datetime | None,
end_dt: datetime.datetime | None,
op_type: int,
) -> Postlogs:
params = [
("word", fname),
("pn", pn),
("ie", "utf-8"),
]
if op_type:
params.append(("op_type", op_type))
if search_value:
if search_type == BawuSearchType.USER:
search_value = quote(search_value)
extend_params = [
("svalue", search_value),
("stype", "post_uname"),
]
else:
extend_params = [
("svalue", search_value),
("stype", "op_uname"),
]
params += extend_params
if start_dt:
begin = int(start_dt.timestamp())
if end_dt is None:
end = int(time.time())
else:
end = int(end_dt.timestamp())
extend_params = [
("end", end),
("begin", begin),
]
params += extend_params
request = http_core.pack_web_get_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/bawu2/platform/listPostLog"), params
)
body = await http_core.net_core.send_request(request, read_bufsize=32 * 1024)
return parse_body(body)
================================================
FILE: src/aiotieba/api/get_bawu_postlogs/_classdef.py
================================================
from __future__ import annotations
import dataclasses as dcs
from datetime import datetime
from typing import TYPE_CHECKING
from ...exception import TbErrorExt
from ...helper import default_datetime
from .._classdef import Containers
from .._classdef.contents import _IMAGEHASH_EXP
if TYPE_CHECKING:
import bs4
@dcs.dataclass
class Media_postlog:
"""
媒体信息
Attributes:
src (str): 小图链接
origin_src (str): 原图链接
hash (str): 百度图床hash
"""
src: str = dcs.field(default="", repr=False)
origin_src: str = dcs.field(default="", repr=False)
hash: str = ""
@staticmethod
def from_xml(data_tag: bs4.element.Tag) -> Media_postlog:
if img_item := data_tag.img:
src = img_item["original"]
hash_ = _IMAGEHASH_EXP.search(src).group(1)
else:
src = ""
hash_ = ""
origin_src = data_tag["href"]
return Media_postlog(src, origin_src, hash_)
@dcs.dataclass
class Postlog:
"""
吧务帖子管理日志
Attributes:
text (str): 文本内容
title (str): 所在主题帖标题
medias (list[Media_postlog]): 媒体列表
tid (int): 所在主题帖id
pid (int): 回复id
op_type (str): 操作类型
post_portrait (str): 发帖用户的portrait
post_time (datetime): 发帖时间 不含年份
op_user_name (str): 操作人用户名
op_time (datetime): 操作时间
"""
text: str = ""
title: str = ""
medias: list[Media_postlog] = dcs.field(default_factory=list)
tid: int = 0
pid: int = 0
op_type: str = ""
post_portrait: str = ""
post_time: datetime = dcs.field(default_factory=default_datetime)
op_user_name: str = ""
op_time: datetime = dcs.field(default_factory=default_datetime)
@staticmethod
def from_xml(data_tag: bs4.element.Tag) -> Postlog:
left_cell_item = data_tag.td
post_meta_item = left_cell_item.find("div", class_="post_meta")
post_user_item = post_meta_item.div
post_portrait = post_user_item.a["href"][14:-17]
post_time_item = post_meta_item.time
post_time_str = post_time_item.text
post_time_month = int(post_time_str[:2])
post_time_day = int(post_time_str[3:5])
post_time_hour = int(post_time_str[7:9])
post_time_minute = int(post_time_str[10:])
post_time = datetime(1904, post_time_month, post_time_day, post_time_hour, post_time_minute)
post_content_item = post_meta_item.next_sibling
title_item = post_content_item.h1.a
url: str = title_item["href"]
tid = int(url[3 : url.find("?")])
pid = int(url[url.rfind("#") + 1 :])
title: str = title_item["title"]
text_item = post_content_item.div
text = text_item.string[12:]
if pid == tid or not title.startswith("回复:"):
# is thread
pid = 0
text = f"{title}\n{text}"
else:
title = title.removeprefix("回复:")
if media_list_item := text_item.next_sibling:
medias = [Media_postlog.from_xml(tag) for tag in media_list_item.find_all("a")]
else:
medias = []
op_type_item = left_cell_item.next_sibling
op_type = op_type_item.string
op_user_name_item = op_type_item.next_sibling
op_user_name = op_user_name_item.string
op_time_item = op_user_name_item.next_sibling
op_time = datetime.strptime(op_time_item.text, "%Y-%m-%d%H:%M")
return Postlog(text, title, medias, tid, pid, op_type, post_portrait, post_time, op_user_name, op_time)
@dcs.dataclass
class Page_postlog:
"""
页信息
Attributes:
current_page (int): 当前页码
total_page (int): 总页码
total_count (int): 总计数
has_more (bool): 是否有后继页
has_prev (bool): 是否有前驱页
"""
current_page: int = 0
total_page: int = 0
total_count: int = 0
has_more: bool = False
has_prev: bool = False
@staticmethod
def from_xml(data_soup: bs4.BeautifulSoup) -> Page_postlog:
total_count_tag = data_soup.find("div", class_="breadcrumbs")
total_count = int(total_count_tag.em.text)
page_tag = data_soup.find("div", class_="tbui_pagination").find("li", class_="active")
if page_tag is None:
if total_count != 0:
current_page = 1
total_page = 1
else:
current_page = 0
total_page = 0
else:
current_page = int(page_tag.text)
total_page_item = page_tag.parent.next_sibling
total_page = int(total_page_item.text[1:-1])
has_more = current_page < total_page
has_prev = current_page > 1
return Page_postlog(current_page, total_page, total_count, has_more, has_prev)
@dcs.dataclass
class Postlogs(TbErrorExt, Containers[Postlog]):
"""
吧务帖子管理日志表
Attributes:
objs (list[Postlog]): 吧务帖子管理日志表
err (Exception | None): 捕获的异常
page (Page_postlog): 页信息
has_more (bool): 是否还有下一页
"""
page: Page_postlog = dcs.field(default_factory=Page_postlog)
@staticmethod
def from_xml(data_soup: bs4.BeautifulSoup) -> Postlogs:
objs = [Postlog.from_xml(t) for t in data_soup.find("tbody").find_all("tr")]
page = Page_postlog.from_xml(data_soup)
return Postlogs(objs, page)
@property
def has_more(self) -> bool:
return self.page.has_more
================================================
FILE: src/aiotieba/api/get_bawu_userlogs/__init__.py
================================================
from ._api import parse_body, request
from ._classdef import Userlog, Userlogs
================================================
FILE: src/aiotieba/api/get_bawu_userlogs/_api.py
================================================
from __future__ import annotations
import time
from typing import TYPE_CHECKING
from urllib.parse import quote
import bs4
import yarl
from ...const import WEB_BASE_HOST
from ...enums import BawuSearchType
from ._classdef import Userlogs
if TYPE_CHECKING:
import datetime
from ...core import HttpCore
def parse_body(body: bytes) -> Userlogs:
soup = bs4.BeautifulSoup(body, "lxml")
bawu_userlogs = Userlogs.from_xml(soup)
return bawu_userlogs
async def request(
http_core: HttpCore,
fname: str,
pn: int,
search_value: str,
search_type: BawuSearchType,
start_dt: datetime.datetime | None,
end_dt: datetime.datetime | None,
op_type: int,
) -> Userlogs:
params = [
("word", fname),
("pn", pn),
("ie", "utf-8"),
]
if op_type:
params.append(("op_type", op_type))
if search_value:
if search_type == BawuSearchType.USER:
search_value = quote(search_value)
extend_params = [
("svalue", search_value),
("stype", "post_uname"),
]
else:
extend_params = [
("svalue", search_value),
("stype", "op_uname"),
]
params += extend_params
if start_dt:
begin = int(start_dt.timestamp())
if end_dt is None:
end = int(time.time())
else:
end = int(end_dt.timestamp())
extend_params = [
("end", end),
("begin", begin),
]
params += extend_params
request = http_core.pack_web_get_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/bawu2/platform/listUserLog"), params
)
body = await http_core.net_core.send_request(request, read_bufsize=16 * 1024)
return parse_body(body)
================================================
FILE: src/aiotieba/api/get_bawu_userlogs/_classdef.py
================================================
from __future__ import annotations
import dataclasses as dcs
from datetime import datetime
from typing import TYPE_CHECKING
from ...exception import TbErrorExt
from ...helper import default_datetime
from .._classdef import Containers
if TYPE_CHECKING:
import bs4
@dcs.dataclass
class Userlog:
"""
吧务用户管理日志
Attributes:
op_type (str): 操作类型
op_duration (int): 操作作用时长
user_portrait (str): 被操作用户的portrait
op_user_name (str): 操作人用户名
op_time (datetime.datetime): 操作时间
"""
op_type: str = ""
op_duration: int = 0
user_portrait: str = ""
op_user_name: str = ""
op_time: datetime = dcs.field(default_factory=default_datetime)
@staticmethod
def from_xml(data_tag: bs4.element.Tag) -> Userlog:
left_cell_item = data_tag.td
post_user_item = left_cell_item.a
user_portrait = post_user_item["href"][14:-17]
op_type_item = left_cell_item.next_sibling.next_sibling
op_type = op_type_item.string
op_duration_item = op_type_item.next_sibling
op_duration = op_duration_item.string.replace(" ", "")
op_duration = 0 if "天" not in op_duration else int(op_duration[:-1])
op_user_name_item = op_duration_item.next_sibling
op_user_name = op_user_name_item.string
op_time_item = op_user_name_item.next_sibling
op_time = datetime.strptime(op_time_item.text, "%Y-%m-%d %H:%M")
return Userlog(op_type, op_duration, user_portrait, op_user_name, op_time)
@dcs.dataclass
class Page_userlog:
"""
页信息
Attributes:
current_page (int): 当前页码
total_page (int): 总页码
total_count (int): 总计数
has_more (bool): 是否有后继页
has_prev (bool): 是否有前驱页
"""
current_page: int = 0
total_page: int = 0
total_count: int = 0
has_more: bool = False
has_prev: bool = False
@staticmethod
def from_xml(data_soup: bs4.BeautifulSoup) -> Page_userlog:
total_count_tag = data_soup.find("div", class_="breadcrumbs")
total_count = int(total_count_tag.em.text)
page_tag = data_soup.find("div", class_="tbui_pagination").find("li", class_="active")
if page_tag is None:
if total_count != 0:
current_page = 1
total_page = 1
else:
current_page = 0
total_page = 0
else:
current_page = int(page_tag.text)
total_page_item = page_tag.parent.next_sibling
total_page = int(total_page_item.text[1:-1])
has_more = current_page < total_page
has_prev = current_page > 1
return Page_userlog(current_page, total_page, total_count, has_more, has_prev)
@dcs.dataclass
class Userlogs(TbErrorExt, Containers[Userlog]):
"""
吧务用户管理日志表
Attributes:
objs (list[Postlog]): 吧务用户管理日志表
err (Exception | None): 捕获的异常
page (Page_userlog): 页信息
has_more (bool): 是否还有下一页
"""
page: Page_userlog = dcs.field(default_factory=Page_userlog)
@staticmethod
def from_xml(data_soup: bs4.BeautifulSoup) -> Userlogs:
objs = [Userlog.from_xml(t) for t in data_soup.find("tbody").find_all("tr")]
page = Page_userlog.from_xml(data_soup)
return Userlogs(objs, page)
@property
def has_more(self) -> bool:
return self.page.has_more
================================================
FILE: src/aiotieba/api/get_blacklist/__init__.py
================================================
from ._api import parse_body, request
from ._classdef import BlacklistUser, BlacklistUsers
================================================
FILE: src/aiotieba/api/get_blacklist/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST, LATEST_VERSION
from ...core import HttpCore
from ...exception import TiebaServerError
from ...helper import parse_json
from ._classdef import BlacklistUsers
def parse_body(body: bytes) -> BlacklistUsers:
res_json = parse_json(body)
if code := int(res_json["error_code"]):
raise TiebaServerError(code, res_json["error_msg"])
blacklist_users = BlacklistUsers.from_json(res_json)
return blacklist_users
async def request(http_core: HttpCore) -> BlacklistUsers:
data = [
("BDUSS", http_core.account.BDUSS),
("_client_version", LATEST_VERSION),
]
request = http_core.pack_form_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/u/user/userBlackPage"), data
)
body = await http_core.net_core.send_request(request, read_bufsize=32 * 1024)
return parse_body(body)
================================================
FILE: src/aiotieba/api/get_blacklist/_classdef.py
================================================
from __future__ import annotations
import dataclasses as dcs
from functools import cached_property
from typing import TYPE_CHECKING
from ...enums import BlacklistType
from ...exception import TbErrorExt
from .._classdef import Containers
if TYPE_CHECKING:
from collections.abc import Mapping
@dcs.dataclass
class BlacklistUser:
"""
用户信息
Attributes:
user_id (int): user_id
portrait (str): portrait
user_name (str): 用户名
nick_name_new (str): 新版昵称
btype (BlacklistType): 黑名单类型 FOLLOW禁止关注 INTERACT禁止互动 CHAT禁止私信
nick_name (str): 用户昵称
show_name (str): 显示名称
log_name (str): 用于在日志中记录用户信息
"""
user_id: int = 0
portrait: str = ""
user_name: str = ""
nick_name_new: str = ""
btype: BlacklistType = BlacklistType.NULL
@staticmethod
def from_json(data_map: Mapping) -> BlacklistUser:
user_id = int(data_map["uid"])
portrait = data_map["portrait"]
if "?" in portrait:
portrait = portrait[:-13]
user_name = data_map["user_name"]
nick_name_new = data_map["name_show"]
btype = BlacklistType.NULL
perm: dict[str, str] = data_map["perm_list"]
if int(perm["follow"]):
btype |= BlacklistType.FOLLOW
if int(perm["chat"]):
btype |= BlacklistType.CHAT
if int(perm["interact"]):
btype |= BlacklistType.INTERACT
return BlacklistUser(user_id, portrait, user_name, nick_name_new, btype)
def __str__(self) -> str:
return self.user_name or self.portrait or str(self.user_id)
def __eq__(self, obj: BlacklistUser) -> bool:
return self.user_id == obj.user_id
def __hash__(self) -> int:
return self.user_id
def __bool__(self) -> bool:
return bool(self.user_id)
@property
def nick_name(self) -> str:
return self.nick_name_new
@property
def show_name(self) -> str:
return self.nick_name_new or self.user_name
@cached_property
def log_name(self) -> str:
if self.user_name:
return self.user_name
elif self.portrait:
return f"{self.nick_name_new}/{self.portrait}"
else:
return str(self.user_id)
@dcs.dataclass
class BlacklistUsers(TbErrorExt, Containers[BlacklistUser]):
"""
新版用户黑名单列表
Attributes:
objs (list[BlacklistUser]): 新版用户黑名单列表
err (Exception | None): 捕获的异常
"""
@staticmethod
def from_json(data_map: Mapping) -> BlacklistUsers:
objs = [BlacklistUser.from_json(m) for m in data_map.get("user_perm_list", [])]
return BlacklistUsers(objs)
================================================
FILE: src/aiotieba/api/get_blacklist_old/__init__.py
================================================
from ._api import CMD, pack_proto, parse_body, request_http, request_ws
from ._classdef import BlacklistOldUser, BlacklistOldUsers
================================================
FILE: src/aiotieba/api/get_blacklist_old/_api.py
================================================
import yarl
from ...const import APP_BASE_HOST, LATEST_VERSION
from ...core import Account, HttpCore, WsCore
from ...exception import TiebaServerError
from ._classdef import BlacklistOldUsers
from .protobuf import UserMuteQueryReqIdl_pb2, UserMuteQueryResIdl_pb2
CMD = 303028
def pack_proto(account: Account, pn: int, rn: int) -> bytes:
req_proto = UserMuteQueryReqIdl_pb2.UserMuteQueryReqIdl()
req_proto.data.common.BDUSS = account.BDUSS
req_proto.data.common._client_version = LATEST_VERSION
req_proto.data.pn = pn
req_proto.data.rn = rn
return req_proto.SerializeToString()
def parse_body(proto: bytes) -> BlacklistOldUsers:
res_proto = UserMuteQueryResIdl_pb2.UserMuteQueryResIdl()
res_proto.ParseFromString(proto)
if code := res_proto.error.errorno:
raise TiebaServerError(code, res_proto.error.errmsg)
data_proto = res_proto.data
blacklist_users = BlacklistOldUsers.from_proto(data_proto)
return blacklist_users
async def request_http(http_core: HttpCore, pn: int, rn: int) -> BlacklistOldUsers:
data = pack_proto(http_core.account, pn, rn)
request = http_core.pack_proto_request(
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/u/user/userMuteQuery", query_string=f"cmd={CMD}"),
data,
)
body = await http_core.net_core.send_request(request, read_bufsize=8 * 1024)
return parse_body(body)
async def request_ws(ws_core: WsCore, pn: int, rn: int) -> BlacklistOldUsers:
data = pack_proto(ws_core.account, pn, rn)
response = await ws_core.send(data, CMD)
return parse_body(await response.read())
================================================
FILE: src/aiotieba/api/get_blacklist_old/_classdef.py
================================================
from __future__ import annotations
import dataclasses as dcs
from functools import cached_property
from ...exception import TbErrorExt
from .._classdef import Containers, TypeMessage
@dcs.dataclass
class BlacklistOldUser:
"""
用户信息
Attributes:
user_id (int): user_id
portrait (str): portrait
user_name (str): 用户名
nick_name_old (str): 旧版昵称
until_time (int): 解禁时间 10位时间戳 以秒为单位
nick_name (str): 用户昵称
show_name (str): 显示名称
log_name (str): 用于在日志中记录用户信息
"""
user_id: int = 0
portrait: str = ""
user_name: str = ""
nick_name_old: str = ""
until_time: int = 0
@staticmethod
def from_proto(data_proto: TypeMessage) -> BlacklistOldUser:
user_id = data_proto.user_id
portrait = data_proto.portrait
if "?" in portrait:
portrait = portrait[:-13]
user_name = data_proto.user_name
nick_name_old = data_proto.name_show
until_time = data_proto.mute_time
return BlacklistOldUser(user_id, portrait, user_name, nick_name_old, until_time)
def __str__(self) -> str:
return self.user_name or self.portrait or str(self.user_id)
def __eq__(self, obj: BlacklistOldUser) -> bool:
return self.user_id == obj.user_id
def __hash__(self) -> int:
return self.user_id
def __bool__(self) -> bool:
return bool(self.user_id)
@property
def nick_name(self) -> str:
return self.nick_name_old
@cached_property
def log_name(self) -> str:
if self.user_name:
return self.user_name
elif self.portrait:
return f"{self.nick_name_old}/{self.portrait}"
else:
return str(self.user_id)
@dcs.dataclass
class Page_blacklist:
"""
页信息
Attributes:
current_page (int): 当前页码
has_more (bool): 是否有后继页
has_prev (bool): 是否有前驱页
"""
current_page: int = 0
has_more: bool = False
has_prev: bool = False
@staticmethod
def from_proto(data_proto: TypeMessage) -> Page_blacklist:
current_page = data_proto.current_page
has_more = bool(data_proto.has_more)
has_prev = bool(data_proto.has_prev)
return Page_blacklist(current_page, has_more, has_prev)
@dcs.dataclass
class BlacklistOldUsers(TbErrorExt, Containers[BlacklistOldUser]):
"""
旧版用户黑名单列表
Attributes:
objs (list[BlacklistOldUser]): 旧版用户黑名单列表
err (Exception | None): 捕获的异常
page (Page_blacklist): 页信息
has_more (bool): 是否还有下一页
"""
page: Page_blacklist = dcs.field(default_factory=Page_blacklist)
@staticmethod
def from_proto(data_proto: TypeMessage) -> BlacklistOldUsers:
objs = [BlacklistOldUser.from_proto(p) for p in data_proto.mute_user]
page = Page_blacklist.from_proto(data_proto.page)
return BlacklistOldUsers(objs, page)
@property
def has_more(self) -> bool:
return self.page.has_more
================================================
FILE: src/aiotieba/api/get_blacklist_old/protobuf/UserMuteQueryReqIdl.proto
================================================
// tbclient.UserMuteQuery.UserMuteQueryReqIdl
syntax = "proto3";
import "CommonReq.proto";
message UserMuteQueryReqIdl {
message DataReq {
CommonReq common = 2;
uint32 pn = 4;
uint32 rn = 5;
}
DataReq data = 1;
}
================================================
FILE: src/aiotieba/api/get_blacklist_old/protobuf/UserMuteQueryReqIdl_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from ..._protobuf import CommonReq_pb2 as CommonReq__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x19UserMuteQueryReqIdl.proto\x1a\x0f\x43ommonReq.proto"\x80\x01\n\x13UserMuteQueryReqIdl\x12*\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x1c.UserMuteQueryReqIdl.DataReq\x1a=\n\x07\x44\x61taReq\x12\x1a\n\x06\x63ommon\x18\x02 \x01(\x0b\x32\n.CommonReq\x12\n\n\x02pn\x18\x04 \x01(\r\x12\n\n\x02rn\x18\x05 \x01(\rb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "UserMuteQueryReqIdl_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_USERMUTEQUERYREQIDL"]._serialized_start = 47
_globals["_USERMUTEQUERYREQIDL"]._serialized_end = 175
_globals["_USERMUTEQUERYREQIDL_DATAREQ"]._serialized_start = 114
_globals["_USERMUTEQUERYREQIDL_DATAREQ"]._serialized_end = 175
================================================
FILE: src/aiotieba/api/get_blacklist_old/protobuf/UserMuteQueryResIdl.proto
================================================
// tbclient.UserMuteQuery.UserMuteQueryResIdl
syntax = "proto3";
import "Error.proto";
import "Page.proto";
message UserMuteQueryResIdl {
message DataRes {
message MuteUser {
int64 user_id = 1;
string user_name = 2;
int32 mute_time = 3;
string portrait = 4;
string name_show = 5;
}
repeated MuteUser mute_user = 1;
Page page = 2;
}
DataRes data = 1;
Error error = 2;
}
================================================
FILE: src/aiotieba/api/get_blacklist_old/protobuf/UserMuteQueryResIdl_pb2.py
================================================
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
_sym_db = _symbol_database.Default()
from ..._protobuf import Error_pb2 as Error__pb2
from ..._protobuf import Page_pb2 as Page__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
b'\n\x19UserMuteQueryResIdl.proto\x1a\x0b\x45rror.proto\x1a\nPage.proto"\x9b\x02\n\x13UserMuteQueryResIdl\x12*\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x1c.UserMuteQueryResIdl.DataRes\x12\x15\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x06.Error\x1a\xc0\x01\n\x07\x44\x61taRes\x12\x38\n\tmute_user\x18\x01 \x03(\x0b\x32%.UserMuteQueryResIdl.DataRes.MuteUser\x12\x13\n\x04page\x18\x02 \x01(\x0b\x32\x05.Page\x1a\x66\n\x08MuteUser\x12\x0f\n\x07user_id\x18\x01 \x01(\x03\x12\x11\n\tuser_name\x18\x02 \x01(\t\x12\x11\n\tmute_time\x18\x03 \x01(\x05\x12\x10\n\x08portrait\x18\x04 \x01(\t\x12\x11\n\tname_show\x18\x05 \x01(\tb\x06proto3'
)
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "UserMuteQueryResIdl_pb2", _globals)
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_USERMUTEQUERYRESIDL"]._serialized_start = 55
_globals["_USERMUTEQUERYRESIDL"]._serialized_end = 338
_globals["_USERMUTEQUERYRESIDL_DATARES"]._serialized_start = 146
_globals["_USERMUTEQUERYRESIDL_DATARES"]._serialized_end = 338
_globals["_USERMUTEQUERYRESIDL_DATARES_MUTEUSER"]._serialized_start = 236
_globals["_USERMUTEQUERYRESIDL_DATARES_MUTEUSER"]._serialized_end = 338
================================================
FILE: src/aiotieba/api/get_blocks/__init__.py
================================================
from ._api import parse_body, request
from ._classdef import Block, Blocks
================================================
FILE: src/aiotieba/api/get_blocks/_api.py
================================================
import yarl
from ...const import WEB_BASE_HOST
from ...core import HttpCore
from ...exception import TiebaServerError
from ...helper import parse_json
from ._classdef import Blocks
def parse_body(body: bytes) -> Blocks:
res_json = parse_json(body)
if code := res_json["no"]:
raise TiebaServerError(code, res_json["error"])
blocks = Blocks.from_json(res_json)
return blocks
async def request(http_core: HttpCore, fid: int, name: str, pn: int) -> Blocks:
params = [
("fn", "-"),
("fid", fid),
("word", name),
("is_ajax", 1),
("pn", pn),
]
request = http_core.pack_web_get_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/mo/q/bawublock"), params
)
body = await http_core.net_core.send_request(request, read_bufsize=32 * 1024)
return parse_body(body)
================================================
FILE: src/aiotieba/api/get_blocks/_classdef.py
================================================
from __futur
gitextract_4rqd5pud/
├── .clang-format
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── discussion.md
│ │ └── feature_request.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── CI-beta.yml
│ ├── CI.yml
│ ├── Pages.yml
│ └── Publish.yml
├── .gitignore
├── CMakeLists.txt
├── LICENSE
├── README.md
├── docs/
│ ├── CNAME
│ ├── css/
│ │ └── custom.css
│ ├── index.md
│ ├── ref/
│ │ ├── classdef/
│ │ │ ├── ats.md
│ │ │ ├── bawu_blacklist.md
│ │ │ ├── bawu_info.md
│ │ │ ├── bawu_perm.md
│ │ │ ├── bawu_postlogs.md
│ │ │ ├── bawu_userlogs.md
│ │ │ ├── blacklist.md
│ │ │ ├── blacklist_old.md
│ │ │ ├── blocks.md
│ │ │ ├── comments.md
│ │ │ ├── dislike_forums.md
│ │ │ ├── fans.md
│ │ │ ├── follow_forums.md
│ │ │ ├── follows.md
│ │ │ ├── forum_detail.md
│ │ │ ├── group_msg.md
│ │ │ ├── images.md
│ │ │ ├── last_replyers.md
│ │ │ ├── member_users.md
│ │ │ ├── posts.md
│ │ │ ├── profile.md
│ │ │ ├── rank_users.md
│ │ │ ├── recom_status.md
│ │ │ ├── recover_thread.md
│ │ │ ├── recovers.md
│ │ │ ├── replys.md
│ │ │ ├── searches.md
│ │ │ ├── self_follow_forums.md
│ │ │ ├── square_forums.md
│ │ │ ├── statistics.md
│ │ │ ├── threads.md
│ │ │ ├── unblock_appeals.md
│ │ │ ├── user_contents.md
│ │ │ └── user_info.md
│ │ ├── client.md
│ │ ├── config.md
│ │ ├── enums.md
│ │ └── exception.md
│ └── tutorial/
│ ├── async_start.md
│ ├── many_utils.md
│ └── start.md
├── mkdocs.yml
├── pyproject.toml
├── scripts/
│ └── proto_compile.py
├── src/
│ └── aiotieba/
│ ├── __init__.py
│ ├── __version__.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── _classdef/
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ ├── container.py
│ │ │ ├── contents.py
│ │ │ ├── user.py
│ │ │ └── vote.py
│ │ ├── _protobuf/
│ │ │ ├── Agree.proto
│ │ │ ├── Agree_pb2.py
│ │ │ ├── CommonReq.proto
│ │ │ ├── CommonReq_pb2.py
│ │ │ ├── Error.proto
│ │ │ ├── Error_pb2.py
│ │ │ ├── ForumList.proto
│ │ │ ├── ForumList_pb2.py
│ │ │ ├── FrsTabInfo.proto
│ │ │ ├── FrsTabInfo_pb2.py
│ │ │ ├── Lcm.proto
│ │ │ ├── Lcm_pb2.py
│ │ │ ├── Media.proto
│ │ │ ├── Media_pb2.py
│ │ │ ├── Page.proto
│ │ │ ├── Page_pb2.py
│ │ │ ├── PbContent.proto
│ │ │ ├── PbContent_pb2.py
│ │ │ ├── PollInfo.proto
│ │ │ ├── PollInfo_pb2.py
│ │ │ ├── Post.proto
│ │ │ ├── PostInfoList.proto
│ │ │ ├── PostInfoList_pb2.py
│ │ │ ├── Post_pb2.py
│ │ │ ├── Rpc.proto
│ │ │ ├── Rpc_pb2.py
│ │ │ ├── SimpleForum.proto
│ │ │ ├── SimpleForum_pb2.py
│ │ │ ├── SubPostList.proto
│ │ │ ├── SubPostList_pb2.py
│ │ │ ├── ThreadInfo.proto
│ │ │ ├── ThreadInfo_pb2.py
│ │ │ ├── User.proto
│ │ │ ├── User_pb2.py
│ │ │ ├── VideoInfo.proto
│ │ │ ├── VideoInfo_pb2.py
│ │ │ ├── Voice.proto
│ │ │ ├── Voice_pb2.py
│ │ │ └── __init__.py
│ │ ├── add_bawu/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── add_bawu_blacklist/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── add_blacklist_old/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── add_post/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── protobuf/
│ │ │ ├── AddPostReqIdl.proto
│ │ │ ├── AddPostReqIdl_pb2.py
│ │ │ ├── AddPostResIdl.proto
│ │ │ └── AddPostResIdl_pb2.py
│ │ ├── agree/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── block/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_bawu/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_bawu_blacklist/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_blacklist_old/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_post/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_posts/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_thread/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── del_threads/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── dislike_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── follow_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── follow_user/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── get_ats/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_bawu_blacklist/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_bawu_info/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetBawuInfoReqIdl.proto
│ │ │ ├── GetBawuInfoReqIdl_pb2.py
│ │ │ ├── GetBawuInfoResIdl.proto
│ │ │ └── GetBawuInfoResIdl_pb2.py
│ │ ├── get_bawu_perm/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_bawu_postlogs/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_bawu_userlogs/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_blacklist/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_blacklist_old/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── UserMuteQueryReqIdl.proto
│ │ │ ├── UserMuteQueryReqIdl_pb2.py
│ │ │ ├── UserMuteQueryResIdl.proto
│ │ │ └── UserMuteQueryResIdl_pb2.py
│ │ ├── get_blocks/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_cid/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── get_comments/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── PbFloorReqIdl.proto
│ │ │ ├── PbFloorReqIdl_pb2.py
│ │ │ ├── PbFloorResIdl.proto
│ │ │ └── PbFloorResIdl_pb2.py
│ │ ├── get_dislike_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetDislikeListReqIdl.proto
│ │ │ ├── GetDislikeListReqIdl_pb2.py
│ │ │ ├── GetDislikeListResIdl.proto
│ │ │ └── GetDislikeListResIdl_pb2.py
│ │ ├── get_fans/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_fid/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── get_follow_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_follows/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_forum/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_forum_detail/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetForumDetailReqIdl.proto
│ │ │ ├── GetForumDetailReqIdl_pb2.py
│ │ │ ├── GetForumDetailResIdl.proto
│ │ │ └── GetForumDetailResIdl_pb2.py
│ │ ├── get_forum_level/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetLevelInfoReqIdl.proto
│ │ │ ├── GetLevelInfoReqIdl_pb2.py
│ │ │ ├── GetLevelInfoResIdl.proto
│ │ │ └── GetLevelInfoResIdl_pb2.py
│ │ ├── get_group_msg/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetGroupMsgReqIdl.proto
│ │ │ ├── GetGroupMsgReqIdl_pb2.py
│ │ │ ├── GetGroupMsgResIdl.proto
│ │ │ └── GetGroupMsgResIdl_pb2.py
│ │ ├── get_images/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_last_replyers/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── FrsPageReqIdl4lp.proto
│ │ │ ├── FrsPageReqIdl4lp_pb2.py
│ │ │ ├── FrsPageResIdl4lp.proto
│ │ │ └── FrsPageResIdl4lp_pb2.py
│ │ ├── get_member_users/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_posts/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── PbPageReqIdl.proto
│ │ │ ├── PbPageReqIdl_pb2.py
│ │ │ ├── PbPageResIdl.proto
│ │ │ └── PbPageResIdl_pb2.py
│ │ ├── get_rank_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_rank_users/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_recom_status/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_recover_info/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_recovers/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_replys/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── ReplyMeReqIdl.proto
│ │ │ ├── ReplyMeReqIdl_pb2.py
│ │ │ ├── ReplyMeResIdl.proto
│ │ │ └── ReplyMeResIdl_pb2.py
│ │ ├── get_roomlist_by_fid/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_self_follow_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_self_follow_forums_v1/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_selfinfo_initNickname/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_selfinfo_moindex/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_square_forums/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetForumSquareReqIdl.proto
│ │ │ ├── GetForumSquareReqIdl_pb2.py
│ │ │ ├── GetForumSquareResIdl.proto
│ │ │ └── GetForumSquareResIdl_pb2.py
│ │ ├── get_statistics/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_tab_map/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── SearchPostForumReqIdl.proto
│ │ │ ├── SearchPostForumReqIdl_pb2.py
│ │ │ ├── SearchPostForumResIdl.proto
│ │ │ └── SearchPostForumResIdl_pb2.py
│ │ ├── get_threads/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── FrsPageReqIdl.proto
│ │ │ ├── FrsPageReqIdl_pb2.py
│ │ │ ├── FrsPageResIdl.proto
│ │ │ └── FrsPageResIdl_pb2.py
│ │ ├── get_uinfo_getUserInfo_web/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_uinfo_getuserinfo_app/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetUserInfoReqIdl.proto
│ │ │ ├── GetUserInfoReqIdl_pb2.py
│ │ │ ├── GetUserInfoResIdl.proto
│ │ │ └── GetUserInfoResIdl_pb2.py
│ │ ├── get_uinfo_panel/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_uinfo_user_json/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_unblock_appeals/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── get_user_contents/
│ │ │ ├── __init__.py
│ │ │ ├── _classdef.py
│ │ │ ├── _const.py
│ │ │ ├── get_posts/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ ├── get_posts_form/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ ├── get_threads/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ └── protobuf/
│ │ │ ├── UserPostReqIdl.proto
│ │ │ ├── UserPostReqIdl_pb2.py
│ │ │ ├── UserPostResIdl.proto
│ │ │ └── UserPostResIdl_pb2.py
│ │ ├── get_user_forum_info/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── good/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── handle_unblock_appeals/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── init_websocket/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── UpdateClientInfoReqIdl.proto
│ │ │ ├── UpdateClientInfoReqIdl_pb2.py
│ │ │ ├── UpdateClientInfoResIdl.proto
│ │ │ └── UpdateClientInfoResIdl_pb2.py
│ │ ├── init_z_id/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── login/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── move/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── profile/
│ │ │ ├── __init__.py
│ │ │ ├── _classdef.py
│ │ │ ├── _const.py
│ │ │ ├── get_homepage/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ ├── get_uinfo_profile/
│ │ │ │ ├── __init__.py
│ │ │ │ └── _api.py
│ │ │ └── protobuf/
│ │ │ ├── ProfileReqIdl.proto
│ │ │ ├── ProfileReqIdl_pb2.py
│ │ │ ├── ProfileResIdl.proto
│ │ │ └── ProfileResIdl_pb2.py
│ │ ├── push_notify/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── PushNotifyResIdl.proto
│ │ │ └── PushNotifyResIdl_pb2.py
│ │ ├── recommend/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── recover/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── remove_fan/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── search_exact/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── _classdef.py
│ │ ├── send_chatroom_msg/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── send_msg/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── protobuf/
│ │ │ ├── CommitPersonalMsgReqIdl.proto
│ │ │ ├── CommitPersonalMsgReqIdl_pb2.py
│ │ │ ├── CommitPersonalMsgResIdl.proto
│ │ │ └── CommitPersonalMsgResIdl_pb2.py
│ │ ├── set_bawu_perm/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── set_blacklist/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── protobuf/
│ │ │ ├── SetUserBlackReqIdl.proto
│ │ │ ├── SetUserBlackReqIdl_pb2.py
│ │ │ ├── SetUserBlackResIdl.proto
│ │ │ └── SetUserBlackResIdl_pb2.py
│ │ ├── set_msg_readed/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ └── protobuf/
│ │ │ ├── CommitReceivedPmsgReqIdl.proto
│ │ │ ├── CommitReceivedPmsgReqIdl_pb2.py
│ │ │ ├── CommitReceivedPmsgResIdl.proto
│ │ │ └── CommitReceivedPmsgResIdl_pb2.py
│ │ ├── set_nickname_old/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── set_profile/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── set_thread_privacy/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── sign_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── sign_forums/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── sign_growth/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── sync/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── tieba_uid2user_info/
│ │ │ ├── __init__.py
│ │ │ ├── _api.py
│ │ │ ├── _classdef.py
│ │ │ └── protobuf/
│ │ │ ├── GetUserByTiebaUidReqIdl.proto
│ │ │ ├── GetUserByTiebaUidReqIdl_pb2.py
│ │ │ ├── GetUserByTiebaUidResIdl.proto
│ │ │ └── GetUserByTiebaUidResIdl_pb2.py
│ │ ├── top/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── unblock/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── undislike_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── unfollow_forum/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ ├── unfollow_user/
│ │ │ ├── __init__.py
│ │ │ └── _api.py
│ │ └── ungood/
│ │ ├── __init__.py
│ │ └── _api.py
│ ├── client.py
│ ├── config.py
│ ├── const.py
│ ├── core/
│ │ ├── __init__.py
│ │ ├── account.py
│ │ ├── blcp.py
│ │ ├── http.py
│ │ ├── net.py
│ │ └── websocket.py
│ ├── enums.py
│ ├── exception.py
│ ├── helper/
│ │ ├── __init__.py
│ │ ├── cache.py
│ │ ├── crypto/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── __init__.py
│ │ │ ├── crypto.pyi
│ │ │ ├── include/
│ │ │ │ ├── base32/
│ │ │ │ │ └── base32.h
│ │ │ │ ├── crc/
│ │ │ │ │ └── crc32.h
│ │ │ │ ├── mbedtls/
│ │ │ │ │ ├── alignment.h
│ │ │ │ │ ├── common.h
│ │ │ │ │ ├── md5.h
│ │ │ │ │ ├── private_access.h
│ │ │ │ │ └── sha1.h
│ │ │ │ ├── rapidjson/
│ │ │ │ │ └── itoa.h
│ │ │ │ ├── tbcrypto/
│ │ │ │ │ ├── bb64.h
│ │ │ │ │ ├── const.h
│ │ │ │ │ ├── cuid.h
│ │ │ │ │ ├── error.h
│ │ │ │ │ ├── pywrap.h
│ │ │ │ │ ├── rc442.h
│ │ │ │ │ └── sign.h
│ │ │ │ └── xxHash/
│ │ │ │ └── xxhash.h
│ │ │ └── src/
│ │ │ ├── base32/
│ │ │ │ └── base32.c
│ │ │ ├── crc/
│ │ │ │ └── crc32.c
│ │ │ ├── mbedtls/
│ │ │ │ ├── md5.c
│ │ │ │ └── sha1.c
│ │ │ └── tbcrypto/
│ │ │ ├── bb64.c
│ │ │ ├── cuid.c
│ │ │ ├── lib.c
│ │ │ ├── rc442.c
│ │ │ └── sign.c
│ │ └── utils.py
│ ├── logging.py
│ └── typing.py
└── tests/
├── conftest.py
├── test_crypto.py
├── test_get_ats.py
├── test_get_blocks.py
├── test_get_comments.py
├── test_get_fans.py
├── test_get_follow_forums.py
├── test_get_follows.py
├── test_get_forum_detail.py
├── test_get_homepage.py
├── test_get_posts.py
├── test_get_recovers.py
├── test_get_threads.py
├── test_get_user_info.py
└── test_get_user_posts.py
SYMBOL INDEX (1513 symbols across 194 files)
FILE: scripts/proto_compile.py
function row_filter (line 18) | def row_filter(rows: list[str], import_perfix: str) -> Iterator[str]:
FILE: src/aiotieba/api/_classdef/container.py
class Containers (line 13) | class Containers(Generic[TypeContainer]):
method __iter__ (line 24) | def __iter__(self) -> Iterator[TypeContainer]:
method __getitem__ (line 28) | def __getitem__(self, idx: SupportsIndex) -> TypeContainer: ...
method __getitem__ (line 31) | def __getitem__(self, idx: slice) -> list[TypeContainer]: ...
method __getitem__ (line 33) | def __getitem__(self, idx):
method __setitem__ (line 36) | def __setitem__(self, idx, val):
method __delitem__ (line 39) | def __delitem__(self, idx):
method __len__ (line 42) | def __len__(self) -> int:
method __bool__ (line 45) | def __bool__(self) -> bool:
FILE: src/aiotieba/api/_classdef/contents.py
class FragText (line 19) | class FragText:
method from_proto (line 30) | def from_proto(data_proto: TypeMessage) -> FragText:
method from_json (line 35) | def from_json(data_map: Mapping) -> FragText:
class TypeFragText (line 40) | class TypeFragText(Protocol):
class FragEmoji (line 45) | class FragEmoji:
method from_proto (line 58) | def from_proto(data_proto: TypeMessage) -> FragEmoji:
class TypeFragEmoji (line 64) | class TypeFragEmoji(Protocol):
class FragImage (line 73) | class FragImage:
method from_proto (line 96) | def from_proto(data_proto: TypeMessage) -> FragImage:
class TypeFragImage (line 115) | class TypeFragImage(Protocol):
class FragAt (line 122) | class FragAt:
method from_proto (line 135) | def from_proto(data_proto: TypeMessage) -> FragAt:
class TypeFragAt (line 141) | class TypeFragAt(Protocol):
class FragVoice (line 147) | class FragVoice:
method from_proto (line 160) | def from_proto(data_proto: TypeMessage) -> FragVoice:
method __bool__ (line 165) | def __bool__(self) -> bool:
class TypeFragVoice (line 169) | class TypeFragVoice(Protocol):
class FragVideo (line 175) | class FragVideo:
method from_proto (line 196) | def from_proto(data_proto: TypeMessage) -> FragVideo:
method __bool__ (line 205) | def __bool__(self) -> bool:
class TypeFragVideo (line 209) | class TypeFragVideo(Protocol):
class FragLink (line 219) | class FragLink:
method from_proto (line 236) | def from_proto(data_proto: TypeMessage) -> FragLink:
method from_json (line 243) | def from_json(data_map: Mapping) -> FragLink:
method url (line 250) | def url(self) -> yarl.URL:
method is_external (line 258) | def is_external(self) -> bool:
class TypeFragLink (line 262) | class TypeFragLink(Protocol):
method url (line 268) | def url(self) -> yarl.URL: ...
method is_external (line 271) | def is_external(self) -> bool: ...
class FragTiebaPlus (line 275) | class FragTiebaPlus:
method from_proto (line 288) | def from_proto(data_proto: TypeMessage) -> FragTiebaPlus:
class TypeFragTiebaPlus (line 294) | class TypeFragTiebaPlus(Protocol):
class FragItem (line 300) | class FragItem:
method from_proto (line 311) | def from_proto(data_proto: TypeMessage) -> FragItem:
class TypeFragItem (line 316) | class TypeFragItem(Protocol):
class FragUnknown (line 321) | class FragUnknown:
method from_proto (line 332) | def from_proto(data: Any) -> FragUnknown:
method from_json (line 336) | def from_json(data: Mapping) -> FragUnknown:
FILE: src/aiotieba/api/_classdef/user.py
class UserInfo (line 9) | class UserInfo:
method __str__ (line 72) | def __str__(self) -> str:
method __eq__ (line 75) | def __eq__(self, obj: UserInfo) -> bool:
method __hash__ (line 78) | def __hash__(self) -> int:
method __bool__ (line 81) | def __bool__(self) -> bool:
method __ior__ (line 84) | def __ior__(self, obj) -> UserInfo:
method nick_name (line 92) | def nick_name(self) -> str:
method show_name (line 96) | def show_name(self) -> str:
method log_name (line 100) | def log_name(self) -> str:
FILE: src/aiotieba/api/_classdef/vote.py
class VoteOption (line 11) | class VoteOption:
method from_proto (line 24) | def from_proto(data_proto: TypeMessage) -> VoteOption:
class VoteInfo (line 31) | class VoteInfo:
method from_proto (line 50) | def from_proto(data_proto: TypeMessage) -> VoteInfo:
method __len__ (line 58) | def __len__(self) -> int:
method __bool__ (line 61) | def __bool__(self) -> bool:
FILE: src/aiotieba/api/add_bawu/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> None:
function request (line 16) | async def request(http_core: HttpCore, fid: int, user_name: str, bawu_ty...
FILE: src/aiotieba/api/add_bawu_blacklist/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fname: str, user_id: int) -> Bool...
FILE: src/aiotieba/api/add_blacklist_old/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 17) | async def request(http_core: HttpCore, user_id: int) -> BoolResponse:
FILE: src/aiotieba/api/add_post/_api.py
function parse_body (line 15) | def parse_body(body: bytes) -> None:
function pack_proto (line 25) | def pack_proto(account: Account, fname: str, fid: int, tid: int, show_na...
function request_http (line 99) | async def request_http(
function request_ws (line 115) | async def request_ws(ws_core: WsCore, fname: str, fid: int, tid: int, sh...
FILE: src/aiotieba/api/agree/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(
FILE: src/aiotieba/api/block/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fid: int, portrait: str, day: int...
FILE: src/aiotieba/api/del_bawu/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> None:
function request (line 16) | async def request(http_core: HttpCore, fid: int, portrait: str, bawu_typ...
FILE: src/aiotieba/api/del_bawu_blacklist/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fname: str, user_id: int) -> Bool...
FILE: src/aiotieba/api/del_blacklist_old/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 17) | async def request(http_core: HttpCore, user_id: int) -> BoolResponse:
FILE: src/aiotieba/api/del_post/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fid: int, tid: int, pid: int) -> ...
FILE: src/aiotieba/api/del_posts/_api.py
function parse_body (line 15) | def parse_body(body: bytes) -> None:
function request (line 21) | async def request(http_core: HttpCore, fid: int, tid: int, pids: list[in...
FILE: src/aiotieba/api/del_thread/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fid: int, tid: int, is_hide: bool...
FILE: src/aiotieba/api/del_threads/_api.py
function parse_body (line 15) | def parse_body(body: bytes) -> None:
function request (line 21) | async def request(http_core: HttpCore, fid: int, tids: list[int], block:...
FILE: src/aiotieba/api/dislike_forum/_api.py
function parse_body (line 11) | def parse_body(body: bytes) -> None:
function request (line 17) | async def request(http_core: HttpCore, fid: int) -> BoolResponse:
FILE: src/aiotieba/api/follow_forum/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 17) | async def request(http_core: HttpCore, fid: int) -> BoolResponse:
FILE: src/aiotieba/api/follow_user/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, portrait: str) -> BoolResponse:
FILE: src/aiotieba/api/get_ats/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> Ats:
function request (line 20) | async def request(http_core: HttpCore, pn: int) -> Ats:
FILE: src/aiotieba/api/get_ats/_classdef.py
class Page_at (line 16) | class Page_at:
method from_json (line 33) | def from_json(data_map: Mapping) -> Page_at:
class UserInfo_at (line 41) | class UserInfo_at:
method from_json (line 68) | def from_json(data_map: Mapping) -> UserInfo_at:
method __str__ (line 84) | def __str__(self) -> str:
method __eq__ (line 87) | def __eq__(self, obj: UserInfo_at) -> bool:
method __hash__ (line 90) | def __hash__(self) -> int:
method __bool__ (line 93) | def __bool__(self) -> bool:
method nick_name (line 97) | def nick_name(self) -> str:
method show_name (line 101) | def show_name(self) -> str:
method log_name (line 105) | def log_name(self) -> str:
class At (line 115) | class At:
method from_json (line 147) | def from_json(data_map: Mapping) -> At:
method __eq__ (line 158) | def __eq__(self, obj: At) -> bool:
method __hash__ (line 161) | def __hash__(self) -> int:
method author_id (line 165) | def author_id(self) -> int:
class Ats (line 170) | class Ats(TbErrorExt, Containers[At]):
method from_json (line 185) | def from_json(data_map: Mapping) -> Ats:
method has_more (line 191) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_bawu_blacklist/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> BawuBlacklistUsers:
function request (line 16) | async def request(http_core: HttpCore, fname: str, pn: int) -> BawuBlack...
FILE: src/aiotieba/api/get_bawu_blacklist/_classdef.py
class BawuBlacklistUser (line 14) | class BawuBlacklistUser:
method from_xml (line 31) | def from_xml(data_tag: bs4.element.Tag) -> BawuBlacklistUser:
method __str__ (line 38) | def __str__(self) -> str:
method __eq__ (line 41) | def __eq__(self, obj: BawuBlacklistUser) -> bool:
method __hash__ (line 44) | def __hash__(self) -> int:
method __bool__ (line 47) | def __bool__(self) -> bool:
method log_name (line 51) | def log_name(self) -> str:
class Page_bwblacklist (line 56) | class Page_bwblacklist:
method from_xml (line 76) | def from_xml(data_soup: bs4.BeautifulSoup) -> Page_bwblacklist:
class BawuBlacklistUsers (line 100) | class BawuBlacklistUsers(TbErrorExt, Containers[BawuBlacklistUser]):
method from_xml (line 115) | def from_xml(data_soup: bs4.BeautifulSoup) -> BawuBlacklistUsers:
method has_more (line 121) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_bawu_info/_api.py
function pack_proto (line 12) | def pack_proto(fid: int) -> bytes:
function parse_body (line 20) | def parse_body(body: bytes) -> BawuInfo:
function request_http (line 33) | async def request_http(http_core: HttpCore, fid: int) -> BawuInfo:
function request_ws (line 45) | async def request_ws(ws_core: WsCore, fid: int) -> BawuInfo:
FILE: src/aiotieba/api/get_bawu_info/_classdef.py
class UserInfo_bawu (line 12) | class UserInfo_bawu:
method from_proto (line 37) | def from_proto(data_proto: TypeMessage) -> UserInfo_bawu:
method __str__ (line 45) | def __str__(self) -> str:
method __eq__ (line 48) | def __eq__(self, obj: UserInfo_bawu) -> bool:
method __hash__ (line 51) | def __hash__(self) -> int:
method __bool__ (line 54) | def __bool__(self) -> bool:
method nick_name (line 58) | def nick_name(self) -> str:
method show_name (line 62) | def show_name(self) -> str:
method log_name (line 66) | def log_name(self) -> str:
class BawuInfo (line 76) | class BawuInfo:
method from_proto (line 109) | def from_proto(data_proto: TypeMessage) -> BawuInfo:
FILE: src/aiotieba/api/get_bawu_perm/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> BawuPerm:
function request (line 21) | async def request(http_core: HttpCore, fid: int, portrait: str) -> BawuP...
FILE: src/aiotieba/api/get_bawu_perm/_classdef.py
class BawuPerm (line 14) | class BawuPerm(TbErrorExt):
method from_json (line 25) | def from_json(data_map: Mapping) -> BawuPerm:
FILE: src/aiotieba/api/get_bawu_postlogs/_api.py
function parse_body (line 20) | def parse_body(body: bytes) -> Postlogs:
function request (line 27) | async def request(
FILE: src/aiotieba/api/get_bawu_postlogs/_classdef.py
class Media_postlog (line 17) | class Media_postlog:
method from_xml (line 32) | def from_xml(data_tag: bs4.element.Tag) -> Media_postlog:
class Postlog (line 44) | class Postlog:
method from_xml (line 77) | def from_xml(data_tag: bs4.element.Tag) -> Postlog:
class Page_postlog (line 126) | class Page_postlog:
method from_xml (line 147) | def from_xml(data_soup: bs4.BeautifulSoup) -> Page_postlog:
class Postlogs (line 171) | class Postlogs(TbErrorExt, Containers[Postlog]):
method from_xml (line 186) | def from_xml(data_soup: bs4.BeautifulSoup) -> Postlogs:
method has_more (line 192) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_bawu_userlogs/_api.py
function parse_body (line 20) | def parse_body(body: bytes) -> Userlogs:
function request (line 27) | async def request(
FILE: src/aiotieba/api/get_bawu_userlogs/_classdef.py
class Userlog (line 16) | class Userlog:
method from_xml (line 35) | def from_xml(data_tag: bs4.element.Tag) -> Userlog:
class Page_userlog (line 58) | class Page_userlog:
method from_xml (line 79) | def from_xml(data_soup: bs4.BeautifulSoup) -> Page_userlog:
class Userlogs (line 103) | class Userlogs(TbErrorExt, Containers[Userlog]):
method from_xml (line 118) | def from_xml(data_soup: bs4.BeautifulSoup) -> Userlogs:
method has_more (line 124) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_blacklist/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> BlacklistUsers:
function request (line 20) | async def request(http_core: HttpCore) -> BlacklistUsers:
FILE: src/aiotieba/api/get_blacklist/_classdef.py
class BlacklistUser (line 16) | class BlacklistUser:
method from_json (line 41) | def from_json(data_map: Mapping) -> BlacklistUser:
method __str__ (line 60) | def __str__(self) -> str:
method __eq__ (line 63) | def __eq__(self, obj: BlacklistUser) -> bool:
method __hash__ (line 66) | def __hash__(self) -> int:
method __bool__ (line 69) | def __bool__(self) -> bool:
method nick_name (line 73) | def nick_name(self) -> str:
method show_name (line 77) | def show_name(self) -> str:
method log_name (line 81) | def log_name(self) -> str:
class BlacklistUsers (line 91) | class BlacklistUsers(TbErrorExt, Containers[BlacklistUser]):
method from_json (line 101) | def from_json(data_map: Mapping) -> BlacklistUsers:
FILE: src/aiotieba/api/get_blacklist_old/_api.py
function pack_proto (line 12) | def pack_proto(account: Account, pn: int, rn: int) -> bytes:
function parse_body (line 22) | def parse_body(proto: bytes) -> BlacklistOldUsers:
function request_http (line 35) | async def request_http(http_core: HttpCore, pn: int, rn: int) -> Blackli...
function request_ws (line 47) | async def request_ws(ws_core: WsCore, pn: int, rn: int) -> BlacklistOldU...
FILE: src/aiotieba/api/get_blacklist_old/_classdef.py
class BlacklistOldUser (line 11) | class BlacklistOldUser:
method from_proto (line 36) | def from_proto(data_proto: TypeMessage) -> BlacklistOldUser:
method __str__ (line 46) | def __str__(self) -> str:
method __eq__ (line 49) | def __eq__(self, obj: BlacklistOldUser) -> bool:
method __hash__ (line 52) | def __hash__(self) -> int:
method __bool__ (line 55) | def __bool__(self) -> bool:
method nick_name (line 59) | def nick_name(self) -> str:
method log_name (line 63) | def log_name(self) -> str:
class Page_blacklist (line 73) | class Page_blacklist:
method from_proto (line 90) | def from_proto(data_proto: TypeMessage) -> Page_blacklist:
class BlacklistOldUsers (line 98) | class BlacklistOldUsers(TbErrorExt, Containers[BlacklistOldUser]):
method from_proto (line 113) | def from_proto(data_proto: TypeMessage) -> BlacklistOldUsers:
method has_more (line 119) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_blocks/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> Blocks:
function request (line 20) | async def request(http_core: HttpCore, fid: int, name: str, pn: int) -> ...
FILE: src/aiotieba/api/get_blocks/_classdef.py
class Block (line 16) | class Block:
method from_xml (line 33) | def from_xml(data_tag: bs4.element.Tag) -> Block:
class Page_block (line 43) | class Page_block:
method from_json (line 66) | def from_json(data_map: Mapping) -> Page_block:
class Blocks (line 77) | class Blocks(TbErrorExt, Containers[Block]):
method from_json (line 91) | def from_json(data_map: Mapping) -> Blocks:
method has_more (line 98) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_cid/_api.py
function parse_body (line 15) | def parse_body(body: bytes) -> list[dict[str, str | int]]:
function request (line 25) | async def request(http_core: HttpCore, fname: str) -> list[dict[str, str...
FILE: src/aiotieba/api/get_comments/_api.py
function pack_proto (line 12) | def pack_proto(tid: int, pid: int, pn: int, is_comment: bool) -> bytes:
function parse_body (line 26) | def parse_body(body: bytes) -> Comments:
function request_http (line 39) | async def request_http(http_core: HttpCore, tid: int, pid: int, pn: int,...
function request_ws (line 51) | async def request_ws(ws_core: WsCore, tid: int, pid: int, pn: int, is_co...
FILE: src/aiotieba/api/get_comments/_classdef.py
class Contents_c (line 33) | class Contents_c(Containers[TypeFragment]):
method from_proto (line 58) | def from_proto(data_proto: TypeMessage) -> Contents_c:
method text (line 113) | def text(self) -> str:
class UserInfo_c (line 119) | class UserInfo_c:
method from_proto (line 160) | def from_proto(data_proto: TypeMessage) -> UserInfo_c:
method __str__ (line 190) | def __str__(self) -> str:
method __eq__ (line 193) | def __eq__(self, obj: UserInfo_c) -> bool:
method __hash__ (line 196) | def __hash__(self) -> int:
method __bool__ (line 199) | def __bool__(self) -> bool:
method nick_name (line 203) | def nick_name(self) -> str:
method show_name (line 207) | def show_name(self) -> str:
method log_name (line 211) | def log_name(self) -> str:
class Comment (line 221) | class Comment:
method from_proto (line 262) | def from_proto(data_proto: TypeMessage) -> None:
method __eq__ (line 290) | def __eq__(self, obj: Comment) -> bool:
method __hash__ (line 293) | def __hash__(self) -> int:
method text (line 297) | def text(self) -> str:
method author_id (line 301) | def author_id(self) -> int:
class Page_c (line 306) | class Page_c:
method from_proto (line 329) | def from_proto(data_proto: TypeMessage) -> Page_c:
class Forum_c (line 340) | class Forum_c:
method from_proto (line 359) | def from_proto(data_proto: TypeMessage) -> Forum_c:
class UserInfo_ct (line 368) | class UserInfo_ct:
method from_proto (line 396) | def from_proto(data_proto: TypeMessage) -> UserInfo_ct:
method __str__ (line 407) | def __str__(self) -> str:
method __eq__ (line 410) | def __eq__(self, obj: UserInfo_ct) -> bool:
method __hash__ (line 413) | def __hash__(self) -> int:
method __bool__ (line 416) | def __bool__(self) -> bool:
method nick_name (line 420) | def nick_name(self) -> str:
method show_name (line 424) | def show_name(self) -> str:
method log_name (line 428) | def log_name(self) -> str:
class Thread_c (line 438) | class Thread_c:
method from_proto (line 469) | def from_proto(data_proto: TypeMessage) -> Thread_c:
method __eq__ (line 481) | def __eq__(self, obj: Thread_c) -> bool:
method __hash__ (line 484) | def __hash__(self) -> int:
method author_id (line 488) | def author_id(self) -> int:
method is_help (line 493) | def is_help(self) -> bool:
class FragImage_cp (line 498) | class FragImage_cp:
method from_proto (line 521) | def from_proto(data_proto: TypeMessage) -> FragImage_cp:
class Contents_cp (line 540) | class Contents_cp(Containers[TypeFragment]):
method from_proto (line 567) | def from_proto(data_proto: TypeMessage) -> Contents_cp:
method text (line 628) | def text(self) -> str:
class UserInfo_cp (line 634) | class UserInfo_cp:
method from_proto (line 673) | def from_proto(data_proto: TypeMessage) -> UserInfo_cp:
method __str__ (line 691) | def __str__(self) -> str:
method __eq__ (line 694) | def __eq__(self, obj: UserInfo_cp) -> bool:
method __hash__ (line 697) | def __hash__(self) -> int:
method __bool__ (line 700) | def __bool__(self) -> bool:
method nick_name (line 704) | def nick_name(self) -> str:
method show_name (line 708) | def show_name(self) -> str:
method log_name (line 712) | def log_name(self) -> str:
class Post_c (line 722) | class Post_c:
method from_proto (line 755) | def from_proto(data_proto: TypeMessage) -> Post_c:
method __eq__ (line 764) | def __eq__(self, obj: Post_c) -> bool:
method __hash__ (line 767) | def __hash__(self) -> int:
method text (line 771) | def text(self) -> str:
method author_id (line 779) | def author_id(self) -> int:
class Comments (line 784) | class Comments(TbErrorExt, Containers[Comment]):
method from_proto (line 806) | def from_proto(data_proto: TypeMessage) -> Comments:
method has_more (line 829) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_dislike_forums/_api.py
function pack_proto (line 12) | def pack_proto(account: Account, pn: int, rn: int) -> bytes:
function parse_body (line 22) | def parse_body(body: bytes) -> DislikeForums:
function request_http (line 35) | async def request_http(http_core: HttpCore, pn: int, rn: int) -> Dislike...
function request_ws (line 47) | async def request_ws(ws_core: WsCore, pn: int, rn: int) -> DislikeForums:
FILE: src/aiotieba/api/get_dislike_forums/_classdef.py
class Page_dislikef (line 10) | class Page_dislikef:
method from_proto (line 27) | def from_proto(data_proto: TypeMessage) -> Page_dislikef:
class DislikeForum (line 35) | class DislikeForum:
method from_proto (line 60) | def from_proto(data_proto: TypeMessage) -> DislikeForum:
method __eq__ (line 68) | def __eq__(self, obj: DislikeForum) -> bool:
method __hash__ (line 71) | def __hash__(self) -> int:
class DislikeForums (line 76) | class DislikeForums(TbErrorExt, Containers[DislikeForum]):
method from_proto (line 90) | def from_proto(data_proto: TypeMessage) -> DislikeForums:
method has_more (line 96) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_fans/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> Fans:
function request (line 20) | async def request(http_core: HttpCore, user_id: int, pn: int) -> Fans:
FILE: src/aiotieba/api/get_fans/_classdef.py
class Fan (line 15) | class Fan:
method from_json (line 36) | def from_json(data_map: Mapping) -> Fan:
method __str__ (line 45) | def __str__(self) -> str:
method __eq__ (line 48) | def __eq__(self, obj: Fan) -> bool:
method __hash__ (line 51) | def __hash__(self) -> int:
method __bool__ (line 54) | def __bool__(self) -> bool:
method nick_name (line 58) | def nick_name(self) -> str:
method show_name (line 62) | def show_name(self) -> str:
method log_name (line 66) | def log_name(self) -> str:
class Page_fan (line 76) | class Page_fan:
method from_json (line 99) | def from_json(data_map: Mapping) -> Page_fan:
class Fans (line 110) | class Fans(TbErrorExt, Containers[Fan]):
method from_json (line 125) | def from_json(data_map: Mapping) -> Fans:
method has_more (line 131) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_fid/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> int:
function request (line 20) | async def request(http_core: HttpCore, fname: str) -> int:
FILE: src/aiotieba/api/get_follow_forums/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> FollowForums:
function request (line 20) | async def request(http_core: HttpCore, user_id: int, pn: int, rn: int) -...
FILE: src/aiotieba/api/get_follow_forums/_classdef.py
class FollowForum (line 14) | class FollowForum:
method from_json (line 32) | def from_json(data_map: Mapping) -> FollowForum:
method __eq__ (line 39) | def __eq__(self, obj: FollowForum) -> bool:
method __hash__ (line 42) | def __hash__(self) -> int:
class FollowForums (line 47) | class FollowForums(TbErrorExt, Containers[FollowForum]):
method from_json (line 61) | def from_json(data_map: Mapping) -> FollowForums:
FILE: src/aiotieba/api/get_follows/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> Follows:
function request (line 20) | async def request(http_core: HttpCore, user_id: int, pn: int) -> Follows:
FILE: src/aiotieba/api/get_follows/_classdef.py
class Follow (line 15) | class Follow:
method from_json (line 36) | def from_json(data_map: Mapping) -> Follow:
method __str__ (line 45) | def __str__(self) -> str:
method __eq__ (line 48) | def __eq__(self, obj: Follow) -> bool:
method __hash__ (line 51) | def __hash__(self) -> int:
method __bool__ (line 54) | def __bool__(self) -> bool:
method nick_name (line 58) | def nick_name(self) -> str:
method show_name (line 62) | def show_name(self) -> str:
method log_name (line 66) | def log_name(self) -> str:
class Page_follow (line 76) | class Page_follow:
method from_json (line 95) | def from_json(data_map: Mapping) -> Page_follow:
class Follows (line 104) | class Follows(TbErrorExt, Containers[Follow]):
method from_json (line 119) | def from_json(data_map: Mapping) -> Follows:
method has_more (line 125) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_forum/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> Forum:
function request (line 21) | async def request(http_core: HttpCore, fname: str) -> Forum:
FILE: src/aiotieba/api/get_forum/_classdef.py
class Forum (line 13) | class Forum(TbErrorExt):
method from_json (line 50) | def from_json(data_map: Mapping) -> Forum:
FILE: src/aiotieba/api/get_forum_detail/_api.py
function pack_proto (line 12) | def pack_proto(fid: int) -> bytes:
function parse_body (line 20) | def parse_body(body: bytes) -> Forum_detail:
function request_http (line 33) | async def request_http(http_core: HttpCore, fid: int) -> Forum_detail:
function request_ws (line 45) | async def request_ws(ws_core: WsCore, fid: int) -> Forum_detail:
FILE: src/aiotieba/api/get_forum_detail/_classdef.py
class Forum_detail (line 13) | class Forum_detail(TbErrorExt):
method from_proto (line 48) | def from_proto(data_proto: TypeMessage) -> Forum_detail:
FILE: src/aiotieba/api/get_forum_level/_api.py
function pack_proto (line 12) | def pack_proto(account: Account, fid: int) -> bytes:
function parse_body (line 20) | def parse_body(body: bytes) -> LevelInfo:
function request_http (line 33) | async def request_http(http_core: HttpCore, forum_id: int) -> LevelInfo:
function request_ws (line 45) | async def request_ws(ws_core: WsCore, forum_id: int) -> LevelInfo:
FILE: src/aiotieba/api/get_forum_level/_classdef.py
class LevelInfo (line 11) | class LevelInfo:
method from_proto (line 27) | def from_proto(data_proto: TypeMessage) -> LevelInfo:
FILE: src/aiotieba/api/get_group_msg/_api.py
function pack_proto (line 15) | def pack_proto(account: Account, group_ids: list[int], msg_ids: list[int...
function parse_body (line 27) | def parse_body(body: bytes) -> WsMsgGroups:
function request (line 40) | async def request(ws_core: WsCore, group_ids: list[int], get_type: int) ...
FILE: src/aiotieba/api/get_group_msg/_classdef.py
class UserInfo_ws (line 10) | class UserInfo_ws:
method from_proto (line 27) | def from_proto(data_proto: TypeMessage) -> UserInfo_ws:
method __str__ (line 35) | def __str__(self) -> str:
method __eq__ (line 38) | def __eq__(self, obj: UserInfo_ws) -> bool:
method __hash__ (line 41) | def __hash__(self) -> int:
method __bool__ (line 44) | def __bool__(self) -> bool:
method log_name (line 48) | def log_name(self) -> str:
class WsMessage (line 53) | class WsMessage:
method from_proto (line 72) | def from_proto(data_proto: TypeMessage) -> None:
class WsMsgGroup (line 82) | class WsMsgGroup:
method from_proto (line 97) | def from_proto(data_proto: TypeMessage) -> WsMsgGroup:
class WsMsgGroups (line 105) | class WsMsgGroups(TbErrorExt, Containers[WsMsgGroup]):
method from_proto (line 115) | def from_proto(data_proto: TypeMessage) -> WsMsgGroups:
FILE: src/aiotieba/api/get_images/_api.py
function _headers_checker (line 9) | def _headers_checker(response: aiohttp.ClientResponse) -> None:
function parse_body (line 17) | def parse_body(body: bytes) -> Image:
function _request_bytes (line 28) | async def _request_bytes(http_core: HttpCore, url: yarl.URL) -> bytes:
function request_bytes (line 40) | async def request_bytes(http_core: HttpCore, url: yarl.URL) -> ImageBytes:
function request (line 45) | async def request(http_core: HttpCore, url: yarl.URL) -> Image:
FILE: src/aiotieba/api/get_images/_classdef.py
function _null_factory (line 12) | def _null_factory() -> np.ndarray:
class Image (line 19) | class Image(TbErrorExt):
class ImageBytes (line 33) | class ImageBytes(TbErrorExt):
FILE: src/aiotieba/api/get_last_replyers/_api.py
function pack_proto (line 12) | def pack_proto(fname: str, pn: int, rn: int, sort: int, is_good: bool) -...
function parse_body (line 26) | def parse_body(body: bytes) -> Threads_lp:
function request_http (line 39) | async def request_http(http_core: HttpCore, fname: str, pn: int, rn: int...
function request_ws (line 51) | async def request_ws(ws_core: WsCore, fname: str, pn: int, rn: int, sort...
FILE: src/aiotieba/api/get_last_replyers/_classdef.py
class Page_lp (line 11) | class Page_lp:
method from_proto (line 34) | def from_proto(data_proto: TypeMessage) -> Page_lp:
class UserInfo_lp (line 47) | class UserInfo_lp:
method from_proto (line 68) | def from_proto(data_proto: TypeMessage) -> UserInfo_lp:
method __str__ (line 77) | def __str__(self) -> str:
method __eq__ (line 80) | def __eq__(self, obj: UserInfo_lp) -> bool:
method __hash__ (line 83) | def __hash__(self) -> int:
method __bool__ (line 86) | def __bool__(self) -> bool:
method nick_name (line 90) | def nick_name(self) -> str:
method show_name (line 94) | def show_name(self) -> str:
method log_name (line 98) | def log_name(self) -> str:
class LastReplyer (line 108) | class LastReplyer:
method from_proto (line 127) | def from_proto(data_proto: TypeMessage) -> LastReplyer:
method __str__ (line 133) | def __str__(self) -> str:
method __eq__ (line 136) | def __eq__(self, obj: LastReplyer) -> bool:
method __hash__ (line 139) | def __hash__(self) -> int:
method __bool__ (line 142) | def __bool__(self) -> bool:
method nick_name (line 146) | def nick_name(self) -> str:
method show_name (line 150) | def show_name(self) -> str:
method log_name (line 154) | def log_name(self) -> str:
class Thread_lp (line 159) | class Thread_lp:
method from_proto (line 198) | def from_proto(data_proto: TypeMessage) -> None:
method __eq__ (line 210) | def __eq__(self, obj: Thread_lp) -> bool:
method __hash__ (line 213) | def __hash__(self) -> int:
method text (line 217) | def text(self) -> str:
method author_id (line 221) | def author_id(self) -> int:
class Forum_lp (line 226) | class Forum_lp:
method from_proto (line 239) | def from_proto(data_proto: TypeMessage) -> Forum_lp:
class Threads_lp (line 247) | class Threads_lp(TbErrorExt, Containers[Thread_lp]):
method from_proto (line 265) | def from_proto(data_proto: TypeMessage) -> Threads_lp:
method has_more (line 277) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_member_users/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> MemberUsers:
function request (line 16) | async def request(http_core: HttpCore, fname: str, pn: int) -> MemberUsers:
FILE: src/aiotieba/api/get_member_users/_classdef.py
class MemberUser (line 14) | class MemberUser:
method from_xml (line 29) | def from_xml(data_tag: bs4.element.Tag) -> MemberUser:
class Page_member (line 39) | class Page_member:
method from_xml (line 58) | def from_xml(data_tag: bs4.element.Tag) -> Page_member:
class MemberUsers (line 68) | class MemberUsers(TbErrorExt, Containers[MemberUser]):
method from_xml (line 83) | def from_xml(data_soup: bs4.BeautifulSoup) -> MemberUsers:
method has_more (line 89) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_posts/_api.py
function pack_proto (line 12) | def pack_proto(
function parse_body (line 40) | def parse_body(body: bytes) -> Posts:
function request_http (line 53) | async def request_http(
function request_ws (line 85) | async def request_ws(
FILE: src/aiotieba/api/get_posts/_classdef.py
class FragImage_p (line 35) | class FragImage_p:
method from_proto (line 58) | def from_proto(data_proto: TypeMessage) -> FragImage_p:
class FragVideo_p (line 77) | class FragVideo_p:
method from_proto (line 98) | def from_proto(data_proto: TypeMessage) -> FragVideo_p:
method __bool__ (line 107) | def __bool__(self) -> bool:
class Contents_p (line 112) | class Contents_p(Containers[TypeFragment]):
method from_proto (line 141) | def from_proto(data_proto: TypeMessage) -> Contents_p:
method text (line 208) | def text(self) -> str:
class Contents_pc (line 214) | class Contents_pc(Containers[TypeFragment]):
method from_proto (line 239) | def from_proto(data_proto: TypeMessage) -> Contents_pc:
method text (line 294) | def text(self) -> str:
class UserInfo_p (line 300) | class UserInfo_p:
method from_proto (line 345) | def from_proto(data_proto: TypeMessage) -> UserInfo_p:
method __str__ (line 379) | def __str__(self) -> str:
method __eq__ (line 382) | def __eq__(self, obj: UserInfo_p) -> bool:
method __hash__ (line 385) | def __hash__(self) -> int:
method __bool__ (line 388) | def __bool__(self) -> bool:
method nick_name (line 392) | def nick_name(self) -> str:
method show_name (line 396) | def show_name(self) -> str:
method log_name (line 400) | def log_name(self) -> str:
class Comment_p (line 410) | class Comment_p:
method from_proto (line 452) | def from_proto(data_proto: TypeMessage) -> Comment_p:
method __eq__ (line 484) | def __eq__(self, obj: Comment_p) -> bool:
method __hash__ (line 487) | def __hash__(self) -> int:
method text (line 491) | def text(self) -> str:
class Post (line 496) | class Post:
method from_proto (line 542) | def from_proto(data_proto: TypeMessage) -> Post:
method __eq__ (line 573) | def __eq__(self, obj: Post) -> bool:
method __hash__ (line 576) | def __hash__(self) -> int:
method text (line 580) | def text(self) -> str:
class Page_p (line 589) | class Page_p:
method from_proto (line 612) | def from_proto(data_proto: TypeMessage) -> Page_p:
class Forum_p (line 623) | class Forum_p:
method from_proto (line 648) | def from_proto(data_proto: TypeMessage) -> Forum_p:
class FragImage_pt (line 659) | class FragImage_pt:
method from_proto (line 680) | def from_proto(data_proto: TypeMessage) -> FragImage_pt:
class Contents_pt (line 697) | class Contents_pt(Containers[TypeFragment]):
method from_proto (line 726) | def from_proto(data_proto: TypeMessage) -> Contents_pt:
method text (line 793) | def text(self) -> str:
class UserInfo_pt (line 799) | class UserInfo_pt:
method from_proto (line 842) | def from_proto(data_proto: TypeMessage) -> UserInfo_pt:
method __str__ (line 874) | def __str__(self) -> str:
method __eq__ (line 877) | def __eq__(self, obj: UserInfo_pt) -> bool:
method __hash__ (line 880) | def __hash__(self) -> int:
method __bool__ (line 883) | def __bool__(self) -> bool:
method nick_name (line 887) | def nick_name(self) -> str:
method show_name (line 891) | def show_name(self) -> str:
method log_name (line 895) | def log_name(self) -> str:
class ShareThread_pt (line 905) | class ShareThread_pt:
method from_proto (line 933) | def from_proto(data_proto: TypeMessage) -> ShareThread_pt:
method __eq__ (line 943) | def __eq__(self, obj: ShareThread_pt) -> bool:
method __hash__ (line 946) | def __hash__(self) -> int:
method text (line 950) | def text(self) -> str:
class Thread_p (line 959) | class Thread_p:
method from_proto (line 1011) | def from_proto(data_proto: TypeMessage) -> Thread_p:
method __eq__ (line 1060) | def __eq__(self, obj: Thread_p) -> bool:
method __hash__ (line 1063) | def __hash__(self) -> int:
method text (line 1067) | def text(self) -> str:
method author_id (line 1075) | def author_id(self) -> int:
method is_help (line 1080) | def is_help(self) -> bool:
class Posts (line 1085) | class Posts(TbErrorExt, Containers[Post]):
method from_proto (line 1105) | def from_proto(data_proto: TypeMessage) -> Posts:
method has_more (line 1133) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_rank_forums/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> RankForums:
function request (line 17) | async def request(http_core: HttpCore, fname: str, pn: int, rank_type: R...
FILE: src/aiotieba/api/get_rank_forums/_classdef.py
class RankForum (line 14) | class RankForum:
method from_xml (line 35) | def from_xml(data_tag: bs4.element.Tag) -> RankForum:
class Page_rankforum (line 50) | class Page_rankforum:
method from_xml (line 69) | def from_xml(data_soup: bs4.BeautifulSoup) -> Page_rankforum:
class RankForums (line 84) | class RankForums(TbErrorExt, Containers[RankForum]):
method from_xml (line 99) | def from_xml(data_soup: bs4.BeautifulSoup) -> RankForums:
method has_more (line 106) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_rank_users/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> RankUsers:
function request (line 16) | async def request(http_core: HttpCore, fname: str, pn: int) -> RankUsers:
FILE: src/aiotieba/api/get_rank_users/_classdef.py
class RankUser (line 17) | class RankUser:
method from_xml (line 34) | def from_xml(data_tag: bs4.element.Tag) -> RankUser:
class Page_rank (line 47) | class Page_rank:
method from_json (line 66) | def from_json(data_map: Mapping) -> Page_rank:
class RankUsers (line 75) | class RankUsers(TbErrorExt, Containers[RankUser]):
method from_xml (line 90) | def from_xml(data_soup: bs4.BeautifulSoup) -> RankUsers:
method has_more (line 98) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_recom_status/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> RecomStatus:
function request (line 20) | async def request(http_core: HttpCore, fid: int) -> RecomStatus:
FILE: src/aiotieba/api/get_recom_status/_classdef.py
class RecomStatus (line 13) | class RecomStatus(TbErrorExt):
method from_json (line 28) | def from_json(data_map: Mapping) -> RecomStatus:
FILE: src/aiotieba/api/get_recover_info/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> RecoverInfo:
function request (line 21) | async def request(http_core: HttpCore, fid: int, tid: int, pid: int) -> ...
FILE: src/aiotieba/api/get_recover_info/_classdef.py
class FragText_ri (line 16) | class FragText_ri:
method from_json (line 27) | def from_json(data_map: Mapping) -> FragText_ri:
class FragImage_ri (line 33) | class FragImage_ri:
method from_json (line 50) | def from_json(data_map: Mapping) -> FragImage_ri:
class Contents_ri (line 61) | class Contents_ri(Containers[TypeFragment]):
method from_json (line 78) | def from_json(data_map: Mapping) -> Contents_ri:
method text (line 103) | def text(self) -> str:
class UserInfo_ri (line 109) | class UserInfo_ri:
method from_json (line 128) | def from_json(data_map: Mapping) -> UserInfo_ri:
method __str__ (line 136) | def __str__(self) -> str:
method __eq__ (line 139) | def __eq__(self, obj: UserInfo_ri) -> bool:
method __hash__ (line 142) | def __hash__(self) -> int:
method __bool__ (line 145) | def __bool__(self) -> bool:
method nick_name (line 149) | def nick_name(self) -> str:
method show_name (line 153) | def show_name(self) -> str:
method log_name (line 157) | def log_name(self) -> str:
class RecoverInfo (line 162) | class RecoverInfo(TbErrorExt):
method from_json (line 184) | def from_json(data_map: Mapping) -> RecoverInfo:
method __eq__ (line 196) | def __eq__(self, obj: RecoverInfo) -> bool:
method __hash__ (line 199) | def __hash__(self) -> int:
method text (line 203) | def text(self) -> str:
FILE: src/aiotieba/api/get_recovers/_api.py
function parse_body (line 16) | def parse_body(body: bytes) -> Recovers:
function request (line 26) | async def request(http_core: HttpCore, fid: int, user_id: int | None, pn...
FILE: src/aiotieba/api/get_recovers/_classdef.py
class UserInfo_rec (line 15) | class UserInfo_rec:
method from_json (line 34) | def from_json(data_map: Mapping) -> UserInfo_rec:
method __str__ (line 42) | def __str__(self) -> str:
method __eq__ (line 45) | def __eq__(self, obj: UserInfo_rec) -> bool:
method __hash__ (line 48) | def __hash__(self) -> int:
method __bool__ (line 51) | def __bool__(self) -> bool:
method nick_name (line 55) | def nick_name(self) -> str:
method show_name (line 59) | def show_name(self) -> str:
method log_name (line 63) | def log_name(self) -> str:
class Recover (line 68) | class Recover:
method from_json (line 95) | def from_json(data_map: Mapping) -> Recover:
class Page_recover (line 114) | class Page_recover:
method from_json (line 133) | def from_json(data_map: Mapping) -> Page_recover:
class Recovers (line 142) | class Recovers(TbErrorExt, Containers[Recover]):
method from_json (line 157) | def from_json(data_map: Mapping) -> None:
method has_more (line 163) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_replys/_api.py
function pack_proto (line 12) | def pack_proto(account: Account, pn: int) -> bytes:
function parse_body (line 21) | def parse_body(proto: bytes) -> Replys:
function request_http (line 34) | async def request_http(http_core: HttpCore, pn: int) -> Replys:
function request_ws (line 46) | async def request_ws(ws_core: WsCore, pn: int) -> Replys:
FILE: src/aiotieba/api/get_replys/_classdef.py
class UserInfo_reply (line 12) | class UserInfo_reply:
method from_proto (line 39) | def from_proto(data_proto: TypeMessage) -> UserInfo_reply:
method __str__ (line 50) | def __str__(self) -> str:
method __eq__ (line 53) | def __eq__(self, obj: UserInfo_reply) -> bool:
method __hash__ (line 56) | def __hash__(self) -> int:
method __bool__ (line 59) | def __bool__(self) -> bool:
method nick_name (line 63) | def nick_name(self) -> str:
method show_name (line 67) | def show_name(self) -> str:
method log_name (line 71) | def log_name(self) -> str:
class UserInfo_reply_p (line 81) | class UserInfo_reply_p:
method from_proto (line 100) | def from_proto(data_proto: TypeMessage) -> UserInfo_reply_p:
method __str__ (line 106) | def __str__(self) -> str:
method __eq__ (line 109) | def __eq__(self, obj: UserInfo_reply_p) -> bool:
method __hash__ (line 112) | def __hash__(self) -> int:
method __bool__ (line 115) | def __bool__(self) -> bool:
method nick_name (line 119) | def nick_name(self) -> str:
method show_name (line 123) | def show_name(self) -> str:
method log_name (line 127) | def log_name(self) -> str:
class UserInfo_reply_t (line 132) | class UserInfo_reply_t:
method from_proto (line 151) | def from_proto(data_proto: TypeMessage) -> UserInfo_reply_t:
method __str__ (line 157) | def __str__(self) -> str:
method __eq__ (line 160) | def __eq__(self, obj: UserInfo_reply_t) -> bool:
method __hash__ (line 163) | def __hash__(self) -> int:
method __bool__ (line 166) | def __bool__(self) -> bool:
method nick_name (line 170) | def nick_name(self) -> str:
method show_name (line 174) | def show_name(self) -> str:
method log_name (line 178) | def log_name(self) -> str:
class Reply (line 183) | class Reply:
method from_proto (line 216) | def from_proto(data_proto: TypeMessage) -> Reply:
method __eq__ (line 229) | def __eq__(self, obj: Reply) -> bool:
method __hash__ (line 232) | def __hash__(self) -> int:
method author_id (line 236) | def author_id(self) -> int:
class Page_reply (line 241) | class Page_reply:
method from_proto (line 258) | def from_proto(data_proto: TypeMessage) -> Page_reply:
class Replys (line 266) | class Replys(TbErrorExt, Containers[Reply]):
method from_proto (line 281) | def from_proto(data_proto: TypeMessage) -> Replys:
method has_more (line 287) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_roomlist_by_fid/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> RoomList:
function request (line 18) | async def request(http_core: HttpCore, fid: int) -> RoomList:
FILE: src/aiotieba/api/get_roomlist_by_fid/_classdef.py
class RoomList (line 7) | class RoomList:
method from_json (line 18) | def from_json(resjson: dict) -> RoomList: # TODO: 解析json并参数化而不是直接返回
FILE: src/aiotieba/api/get_self_follow_forums/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> SelfFollowForums:
function request (line 20) | async def request(http_core: HttpCore, pn: int, rn: int) -> SelfFollowFo...
FILE: src/aiotieba/api/get_self_follow_forums/_classdef.py
class SelfFollowForum (line 14) | class SelfFollowForum:
method from_json (line 31) | def from_json(data_map: Mapping) -> SelfFollowForum:
class SelfFollowForums (line 40) | class SelfFollowForums(TbErrorExt, Containers[SelfFollowForum]):
method from_json (line 54) | def from_json(data_map: Mapping) -> SelfFollowForums:
FILE: src/aiotieba/api/get_self_follow_forums_v1/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> SelfFollowForumsV1:
function request (line 21) | async def request(http_core: HttpCore, pn: int, rn: int) -> SelfFollowFo...
FILE: src/aiotieba/api/get_self_follow_forums_v1/_classdef.py
class SelfFollowForumV1 (line 14) | class SelfFollowForumV1:
method from_json (line 29) | def from_json(data_map: Mapping) -> SelfFollowForumV1:
class Page_sforumV1 (line 37) | class Page_sforumV1:
method from_json (line 56) | def from_json(data_map: Mapping) -> Page_sforumV1:
class SelfFollowForumsV1 (line 65) | class SelfFollowForumsV1(TbErrorExt, Containers[SelfFollowForumV1]):
method from_json (line 80) | def from_json(data_map: Mapping) -> SelfFollowForumsV1:
method has_more (line 86) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_selfinfo_initNickname/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> UserInfo_selfinit:
function request (line 21) | async def request(http_core: HttpCore) -> UserInfo_selfinit:
FILE: src/aiotieba/api/get_selfinfo_initNickname/_classdef.py
class UserInfo_selfinit (line 12) | class UserInfo_selfinit:
method from_json (line 31) | def from_json(data_map: Mapping) -> UserInfo_selfinit:
method __str__ (line 37) | def __str__(self) -> str:
method __eq__ (line 40) | def __eq__(self, obj: UserInfo_selfinit) -> bool:
method __hash__ (line 43) | def __hash__(self) -> int:
method __bool__ (line 46) | def __bool__(self) -> bool:
method nick_name (line 50) | def nick_name(self) -> str:
method log_name (line 54) | def log_name(self) -> str:
FILE: src/aiotieba/api/get_selfinfo_moindex/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> UserInfo_moindex:
function request (line 21) | async def request(http_core: HttpCore) -> UserInfo_moindex:
FILE: src/aiotieba/api/get_selfinfo_moindex/_classdef.py
class UserInfo_moindex (line 14) | class UserInfo_moindex:
method from_json (line 49) | def from_json(data_map: Mapping) -> UserInfo_moindex:
method __str__ (line 70) | def __str__(self) -> str:
method __eq__ (line 73) | def __eq__(self, obj: UserInfo_moindex) -> bool:
method __hash__ (line 76) | def __hash__(self) -> int:
method __bool__ (line 79) | def __bool__(self) -> bool:
method log_name (line 83) | def log_name(self) -> str:
FILE: src/aiotieba/api/get_square_forums/_api.py
function pack_proto (line 12) | def pack_proto(account: Account, cname: str, pn: int, rn: int) -> bytes:
function parse_body (line 23) | def parse_body(body: bytes) -> SquareForums:
function request_http (line 36) | async def request_http(http_core: HttpCore, cname: str, pn: int, rn: int...
function request_ws (line 48) | async def request_ws(ws_core: WsCore, cname: str, pn: int, rn: int) -> S...
FILE: src/aiotieba/api/get_square_forums/_classdef.py
class SquareForum (line 10) | class SquareForum:
method from_proto (line 33) | def from_proto(data_proto: TypeMessage) -> SquareForum:
method __eq__ (line 41) | def __eq__(self, obj: SquareForum) -> bool:
method __hash__ (line 44) | def __hash__(self) -> int:
class Page_square (line 49) | class Page_square:
method from_proto (line 72) | def from_proto(data_proto: TypeMessage) -> Page_square:
class SquareForums (line 83) | class SquareForums(TbErrorExt, Containers[SquareForum]):
method from_proto (line 98) | def from_proto(data_proto: TypeMessage | None = None) -> None:
method has_more (line 104) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_statistics/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> Statistics:
function request (line 21) | async def request(http_core: HttpCore, fid: int) -> Statistics:
FILE: src/aiotieba/api/get_statistics/_classdef.py
class Statistics (line 11) | class Statistics:
method from_json (line 37) | def from_json(data_seq: Sequence) -> Statistics:
FILE: src/aiotieba/api/get_tab_map/_api.py
function pack_proto (line 12) | def pack_proto(account: Account, fname: str) -> bytes:
function parse_body (line 21) | def parse_body(body: bytes) -> TabMap:
function request_http (line 34) | async def request_http(http_core: HttpCore, fname: str) -> TabMap:
function request_ws (line 48) | async def request_ws(ws_core: WsCore, fname: str) -> TabMap:
FILE: src/aiotieba/api/get_tab_map/_classdef.py
class TabMap (line 13) | class TabMap(TbErrorExt):
method from_proto (line 26) | def from_proto(data_proto: TypeMessage) -> TabMap:
method __getitem__ (line 30) | def __getitem__(self, key: str) -> int:
FILE: src/aiotieba/api/get_threads/_api.py
function pack_proto (line 12) | def pack_proto(fname: str, pn: int, rn: int, sort: int, is_good: bool, v...
function parse_body (line 26) | def parse_body(body: bytes) -> Threads:
function request_http (line 39) | async def request_http(
function request_ws (line 53) | async def request_ws(ws_core: WsCore, fname: str, pn: int, rn: int, sort...
FILE: src/aiotieba/api/get_threads/_classdef.py
class FragImage_feed (line 37) | class FragImage_feed:
method from_proto (line 58) | def from_proto(data_proto: TypeMessage) -> FragImage_feed:
class FragEmoji_feed (line 71) | class FragEmoji_feed:
method from_proto (line 84) | def from_proto(data_proto: TypeMessage) -> FragEmoji_feed:
class Contents_t (line 91) | class Contents_t(Containers[TypeFragment]):
method from_proto (line 120) | def from_proto(data_proto: TypeMessage) -> Contents_t:
method from_feed (line 191) | def from_feed(data_proto: TypeMessage) -> Contents_t:
method text (line 229) | def text(self) -> str:
class Page_t (line 235) | class Page_t:
method from_proto (line 258) | def from_proto(data_proto: TypeMessage) -> Page_t:
class UserInfo_t (line 271) | class UserInfo_t:
method from_proto (line 314) | def from_proto(data_proto: TypeMessage) -> UserInfo_t:
method __str__ (line 346) | def __str__(self) -> str:
method __eq__ (line 349) | def __eq__(self, obj: UserInfo_t) -> bool:
method __hash__ (line 352) | def __hash__(self) -> int:
method __bool__ (line 355) | def __bool__(self) -> bool:
method nick_name (line 359) | def nick_name(self) -> str:
method show_name (line 363) | def show_name(self) -> str:
method log_name (line 367) | def log_name(self) -> str:
class FragImage_st (line 377) | class FragImage_st:
method from_proto (line 398) | def from_proto(data_proto: TypeMessage) -> FragImage_st:
class Contents_st (line 415) | class Contents_st(Containers[TypeFragment]):
method from_proto (line 444) | def from_proto(data_proto: TypeMessage) -> Contents_st:
method text (line 513) | def text(self) -> str:
class ShareThread (line 519) | class ShareThread:
method from_proto (line 551) | def from_proto(data_proto: TypeMessage) -> ShareThread:
method __eq__ (line 562) | def __eq__(self, obj: ShareThread) -> bool:
method __hash__ (line 565) | def __hash__(self) -> int:
method text (line 569) | def text(self) -> str:
class Thread (line 578) | class Thread:
method from_proto (line 643) | def from_proto(data_proto: TypeMessage) -> None:
method from_feed (line 704) | def from_feed(data_proto: TypeMessage) -> None:
method __eq__ (line 767) | def __eq__(self, obj: Thread) -> bool:
method __hash__ (line 770) | def __hash__(self) -> int:
method text (line 774) | def text(self) -> str:
method is_help (line 783) | def is_help(self) -> bool:
class Forum_t (line 788) | class Forum_t:
method from_proto (line 821) | def from_proto(data_proto: TypeMessage) -> Forum_t:
class Threads (line 836) | class Threads(TbErrorExt, Containers[Thread]):
method from_proto (line 856) | def from_proto(data_proto: TypeMessage) -> Threads:
method from_feed (line 871) | def from_feed(data_proto: TypeMessage) -> Threads:
method has_more (line 885) | def has_more(self) -> bool:
FILE: src/aiotieba/api/get_uinfo_getUserInfo_web/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> UserInfo_guinfo_web:
function request (line 21) | async def request(http_core: HttpCore, user_id: int) -> UserInfo_guinfo_...
FILE: src/aiotieba/api/get_uinfo_getUserInfo_web/_classdef.py
class UserInfo_guinfo_web (line 14) | class UserInfo_guinfo_web(TbErrorExt):
method from_json (line 37) | def from_json(data_map: Mapping) -> UserInfo_guinfo_web:
method __str__ (line 44) | def __str__(self) -> str:
method __eq__ (line 47) | def __eq__(self, obj: UserInfo_guinfo_web) -> bool:
method __hash__ (line 50) | def __hash__(self) -> int:
method __bool__ (line 53) | def __bool__(self) -> bool:
method nick_name (line 57) | def nick_name(self) -> str:
method show_name (line 61) | def show_name(self) -> str:
method log_name (line 65) | def log_name(self) -> str:
FILE: src/aiotieba/api/get_uinfo_getuserinfo_app/_api.py
function pack_proto (line 12) | def pack_proto(user_id: int) -> bytes:
function parse_body (line 19) | def parse_body(body: bytes) -> UserInfo_guinfo_app:
function request_http (line 32) | async def request_http(http_core: HttpCore, user_id: int) -> UserInfo_gu...
function request_ws (line 44) | async def request_ws(ws_core: WsCore, user_id: int) -> UserInfo_guinfo_app:
FILE: src/aiotieba/api/get_uinfo_getuserinfo_app/_classdef.py
class UserInfo_guinfo_app (line 15) | class UserInfo_guinfo_app(TbErrorExt):
method from_proto (line 47) | def from_proto(data_proto: TypeMessage) -> UserInfo_guinfo_app:
method __str__ (line 59) | def __str__(self) -> str:
method __eq__ (line 62) | def __eq__(self, obj: UserInfo_guinfo_app) -> bool:
method __hash__ (line 65) | def __hash__(self) -> int:
method __bool__ (line 68) | def __bool__(self) -> bool:
method nick_name (line 72) | def nick_name(self) -> str:
method log_name (line 76) | def log_name(self) -> str:
FILE: src/aiotieba/api/get_uinfo_panel/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> UserInfo_panel:
function request (line 21) | async def request(http_core: HttpCore, name_or_portrait: str) -> UserInf...
FILE: src/aiotieba/api/get_uinfo_panel/_classdef.py
function _tbnum2int (line 14) | def _tbnum2int(tb_num: str) -> int:
class UserInfo_panel (line 22) | class UserInfo_panel(TbErrorExt):
method from_json (line 59) | def from_json(data_map: Mapping) -> UserInfo_panel:
method __str__ (line 88) | def __str__(self) -> str:
method __eq__ (line 91) | def __eq__(self, obj: UserInfo_panel) -> bool:
method __hash__ (line 94) | def __hash__(self) -> int:
method __bool__ (line 97) | def __bool__(self) -> bool:
method nick_name (line 101) | def nick_name(self) -> str:
method show_name (line 105) | def show_name(self) -> str:
method log_name (line 109) | def log_name(self) -> str:
FILE: src/aiotieba/api/get_uinfo_user_json/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> UserInfo_json:
function request (line 23) | async def request(http_core: HttpCore, user_name: str) -> UserInfo_json:
FILE: src/aiotieba/api/get_uinfo_user_json/_classdef.py
class UserInfo_json (line 13) | class UserInfo_json(TbErrorExt):
method from_json (line 32) | def from_json(data_map: Mapping) -> UserInfo_json:
method __str__ (line 38) | def __str__(self) -> str:
method __eq__ (line 41) | def __eq__(self, obj: UserInfo_json) -> bool:
method __hash__ (line 44) | def __hash__(self) -> int:
method __bool__ (line 47) | def __bool__(self) -> bool:
method log_name (line 51) | def log_name(self) -> str:
FILE: src/aiotieba/api/get_unblock_appeals/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> Appeals:
function request (line 20) | async def request(http_core: HttpCore, fid: int, pn: int, rn: int) -> Ap...
FILE: src/aiotieba/api/get_unblock_appeals/_classdef.py
class Appeal (line 14) | class Appeal:
method from_json (line 49) | def from_json(data_map: Mapping) -> Appeal:
class Appeals (line 80) | class Appeals(TbErrorExt, Containers[Appeal]):
method from_json (line 94) | def from_json(data_map: Mapping) -> Appeals:
FILE: src/aiotieba/api/get_user_contents/_classdef.py
class FragVoice_up (line 38) | class FragVoice_up:
method from_proto (line 51) | def from_proto(data_proto: TypeMessage) -> FragVoice_up:
method from_json (line 57) | def from_json(data_map: Mapping) -> FragVoice_up:
method __bool__ (line 62) | def __bool__(self) -> bool:
class Contents_up (line 67) | class Contents_up(Containers[TypeFragment]):
method from_proto (line 86) | def from_proto(data_proto: TypeMessage) -> Contents_up:
method from_json (line 117) | def from_json(data_map: Mapping) -> Contents_up:
method text (line 148) | def text(self) -> str:
class UserInfo_u (line 154) | class UserInfo_u:
method from_proto (line 175) | def from_proto(data_proto: TypeMessage) -> UserInfo_u:
method from_json (line 185) | def from_json(data_map: Mapping) -> UserInfo_u:
method __str__ (line 194) | def __str__(self) -> str:
method __eq__ (line 197) | def __eq__(self, obj: UserInfo_u) -> bool:
method __hash__ (line 200) | def __hash__(self) -> int:
method __bool__ (line 203) | def __bool__(self) -> bool:
method nick_name (line 207) | def nick_name(self) -> str:
method show_name (line 211) | def show_name(self) -> str:
method log_name (line 215) | def log_name(self) -> str:
class UserPost (line 225) | class UserPost:
method from_proto (line 256) | def from_proto(data_proto: TypeMessage) -> UserPost:
method from_json (line 264) | def from_json(data_map: Mapping) -> UserPost:
method __eq__ (line 271) | def __eq__(self, obj: UserPost) -> bool:
method __hash__ (line 274) | def __hash__(self) -> int:
method text (line 278) | def text(self) -> str:
method author_id (line 282) | def author_id(self) -> int:
class UserPosts (line 287) | class UserPosts(Containers[UserPost]):
method from_proto (line 302) | def from_proto(data_proto: TypeMessage) -> UserPosts:
method from_json (line 312) | def from_json(data_map: Mapping) -> UserPosts:
class UserPostss (line 323) | class UserPostss(TbErrorExt, Containers[UserPosts]):
method from_proto (line 333) | def from_proto(data_proto: TypeMessage) -> UserPostss:
method from_json (line 343) | def from_json(data_map: Mapping) -> UserPostss:
class FragImage_ut (line 354) | class FragImage_ut:
method from_proto (line 377) | def from_proto(data_proto: TypeMessage) -> FragImage_ut:
class Contents_ut (line 392) | class Contents_ut(Containers[TypeFragment]):
method from_proto (line 419) | def from_proto(data_proto: TypeMessage) -> Contents_ut:
method text (line 479) | def text(self) -> str:
class UserThread (line 485) | class UserThread:
method from_proto (line 533) | def from_proto(data_proto: TypeMessage) -> UserThread:
method __eq__ (line 570) | def __eq__(self, obj: UserThread) -> bool:
method __hash__ (line 573) | def __hash__(self) -> int:
method text (line 577) | def text(self) -> str:
method is_help (line 586) | def is_help(self) -> bool:
class UserThreads (line 591) | class UserThreads(TbErrorExt, Containers[UserThread]):
method from_proto (line 601) | def from_proto(data_proto: TypeMessage) -> UserThreads:
FILE: src/aiotieba/api/get_user_contents/get_posts/_api.py
function pack_proto (line 11) | def pack_proto(account: Account, user_id: int, pn: int, rn: int, version...
function parse_body (line 23) | def parse_body(body: bytes) -> UserPostss:
function request_http (line 36) | async def request_http(http_core: HttpCore, user_id: int, pn: int, rn: i...
function request_ws (line 48) | async def request_ws(ws_core: WsCore, user_id: int, pn: int, rn: int, ve...
FILE: src/aiotieba/api/get_user_contents/get_posts_form/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> UserPostss:
function request (line 20) | async def request(http_core: HttpCore, user_id: int, pn: int, rn: int) -...
FILE: src/aiotieba/api/get_user_contents/get_threads/_api.py
function pack_proto (line 11) | def pack_proto(user_id: int, pn: int, public_only: bool) -> bytes:
function parse_body (line 23) | def parse_body(body: bytes) -> UserThreads:
function request_http (line 36) | async def request_http(http_core: HttpCore, user_id: int, pn: int, publi...
function request_ws (line 48) | async def request_ws(ws_core: WsCore, user_id: int, pn: int, public_only...
FILE: src/aiotieba/api/get_user_forum_info/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> UserForumInfo:
function request (line 20) | async def request(http_core: HttpCore, forum_id: int, friend_portrait: s...
FILE: src/aiotieba/api/get_user_forum_info/_classdef.py
class UserInfo_uf (line 13) | class UserInfo_uf:
method from_json (line 30) | def from_json(data_map: Mapping) -> UserInfo_uf:
method __str__ (line 39) | def __str__(self) -> str:
method __eq__ (line 42) | def __eq__(self, obj: object) -> bool:
method __hash__ (line 45) | def __hash__(self) -> int:
method __bool__ (line 48) | def __bool__(self) -> bool:
class UserForumInfo (line 53) | class UserForumInfo(TbErrorExt):
method from_json (line 102) | def from_json(data_map: Mapping) -> UserForumInfo:
FILE: src/aiotieba/api/good/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fname: str, fid: int, tid: int, c...
FILE: src/aiotieba/api/handle_unblock_appeals/_api.py
function parse_body (line 15) | def parse_body(body: bytes) -> None:
function request (line 21) | async def request(http_core: HttpCore, fid: int, appeal_ids: list[int], ...
FILE: src/aiotieba/api/init_websocket/_api.py
function pack_proto (line 27) | def pack_proto(account: Account) -> bytes:
function parse_body (line 50) | def parse_body(body: bytes) -> list[WsMsgGroupInfo]:
function request (line 62) | async def request(ws_core: WsCore) -> list[WsMsgGroupInfo]:
FILE: src/aiotieba/api/init_websocket/_classdef.py
class WsMsgGroupInfo (line 11) | class WsMsgGroupInfo:
method from_proto (line 26) | def from_proto(data_proto: TypeMessage) -> WsMsgGroupInfo:
FILE: src/aiotieba/api/init_z_id/_api.py
function request (line 19) | async def request(http_core: HttpCore):
FILE: src/aiotieba/api/login/_api.py
function parse_body (line 16) | def parse_body(body: bytes) -> tuple[UserInfo_login, str]:
function request (line 28) | async def request(http_core: HttpCore) -> tuple[UserInfo_login, str]:
FILE: src/aiotieba/api/login/_classdef.py
class UserInfo_login (line 11) | class UserInfo_login:
method from_json (line 26) | def from_json(data_map: Mapping) -> UserInfo_login:
method __str__ (line 32) | def __str__(self) -> str:
method __hash__ (line 35) | def __hash__(self) -> int:
method __bool__ (line 38) | def __bool__(self) -> bool:
FILE: src/aiotieba/api/move/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fid: int, tid: int, to_tab_id: in...
FILE: src/aiotieba/api/profile/_classdef.py
class UserInfo_pf (line 31) | class UserInfo_pf(TbErrorExt):
method from_proto (line 92) | def from_proto(data_proto: TypeMessage) -> UserInfo_pf:
method __str__ (line 145) | def __str__(self) -> str:
method __eq__ (line 148) | def __eq__(self, obj: UserInfo_pf) -> bool:
method __hash__ (line 151) | def __hash__(self) -> int:
method __bool__ (line 154) | def __bool__(self) -> bool:
method nick_name (line 158) | def nick_name(self) -> str:
method show_name (line 162) | def show_name(self) -> str:
method log_name (line 166) | def log_name(self) -> str:
class FragImage_pf (line 176) | class FragImage_pf:
method from_proto (line 196) | def from_proto(data_proto: TypeMessage) -> FragImage_pf:
class Contents_pf (line 210) | class Contents_pf(Containers[TypeFragment]):
method from_proto (line 237) | def from_proto(data_proto: TypeMessage) -> Contents_pf:
method text (line 296) | def text(self) -> str:
class Thread_pf (line 302) | class Thread_pf:
method from_proto (line 345) | def from_proto(data_proto: TypeMessage) -> Thread_pf:
method __eq__ (line 376) | def __eq__(self, obj: Thread_pf) -> bool:
method __hash__ (line 379) | def __hash__(self) -> int:
method text (line 383) | def text(self) -> str:
method author_id (line 391) | def author_id(self) -> int:
class Homepage (line 396) | class Homepage(TbErrorExt, Containers[Thread_pf]):
method from_proto (line 410) | def from_proto(data_proto: TypeMessage) -> Homepage:
FILE: src/aiotieba/api/profile/get_homepage/_api.py
function pack_proto (line 11) | def pack_proto(user_id: int, pn: int) -> bytes:
function parse_body (line 22) | def parse_body(body: bytes) -> Homepage:
function request_http (line 35) | async def request_http(http_core: HttpCore, user_id: int, pn: int) -> Ho...
function request_ws (line 47) | async def request_ws(ws_core: WsCore, user_id: int, pn: int) -> Homepage:
FILE: src/aiotieba/api/profile/get_uinfo_profile/_api.py
function pack_proto (line 17) | def pack_proto(uid_or_portrait: str | int) -> bytes:
function parse_body (line 32) | def parse_body(body: bytes) -> UserInfo_pf:
function request_http (line 45) | async def request_http(http_core: HttpCore, uid_or_portrait: str | int) ...
function request_ws (line 57) | async def request_ws(ws_core: WsCore, uid_or_portrait: str | int) -> Use...
FILE: src/aiotieba/api/push_notify/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> list[WsNotify]:
FILE: src/aiotieba/api/push_notify/_classdef.py
class WsNotify (line 11) | class WsNotify:
method from_proto (line 30) | def from_proto(data_proto: TypeMessage) -> WsNotify:
FILE: src/aiotieba/api/recommend/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 17) | async def request(http_core: HttpCore, fid: int, tid: int) -> BoolResponse:
FILE: src/aiotieba/api/recover/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fid: int, tid: int, pid: int, is_...
FILE: src/aiotieba/api/remove_fan/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, user_id: int) -> BoolResponse:
FILE: src/aiotieba/api/search_exact/_api.py
function parse_body (line 11) | def parse_body(body: bytes) -> ExactSearches:
function request (line 21) | async def request(
FILE: src/aiotieba/api/search_exact/_classdef.py
class ExactSearch (line 14) | class ExactSearch:
method from_json (line 43) | def from_json(data_map: Mapping) -> ExactSearch:
method __eq__ (line 54) | def __eq__(self, obj: ExactSearch) -> bool:
method __hash__ (line 57) | def __hash__(self) -> int:
class Page_exsch (line 62) | class Page_exsch:
method from_json (line 85) | def from_json(data_map: Mapping) -> Page_exsch:
class ExactSearches (line 96) | class ExactSearches(TbErrorExt, Containers[ExactSearch]):
method from_json (line 111) | def from_json(data_map: Mapping) -> ExactSearches:
method has_more (line 117) | def has_more(self) -> bool:
FILE: src/aiotieba/api/send_chatroom_msg/_api.py
class AppConstants (line 10) | class AppConstants:
function construct_request_data (line 15) | async def construct_request_data(
function send_request (line 165) | async def send_request(blcpcore, request_data):
function request (line 188) | async def request(
FILE: src/aiotieba/api/send_msg/_api.py
function pack_proto (line 8) | def pack_proto(user_id: int, content: str, record_id: int) -> bytes:
function parse_body (line 18) | def parse_body(body: bytes) -> int:
function request (line 31) | async def request(ws_core: WsCore, user_id: int, content: str) -> int:
FILE: src/aiotieba/api/set_bawu_perm/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> None:
function pack_perm_settings (line 16) | def pack_perm_settings(perms: BawuPermType) -> list:
function request (line 33) | async def request(http_core: HttpCore, fid: int, portrait: str, perms: B...
FILE: src/aiotieba/api/set_blacklist/_api.py
function pack_proto (line 12) | def pack_proto(account: Account, user_id: int, btype: BlacklistType) -> ...
function parse_body (line 25) | def parse_body(body: bytes) -> None:
function request_http (line 33) | async def request_http(http_core: HttpCore, user_id: int, btype: Blackli...
function request_ws (line 47) | async def request_ws(ws_core: WsCore, user_id: int, btype: BlacklistType...
FILE: src/aiotieba/api/set_msg_readed/_api.py
function pack_proto (line 10) | def pack_proto(user_id: int, group_id: int, msg_id: int) -> bytes:
function parse_body (line 20) | def parse_body(body: bytes) -> None:
function request (line 28) | async def request(ws_core: WsCore, message: WsMessage) -> BoolResponse:
FILE: src/aiotieba/api/set_nickname_old/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, nick_name: str) -> BoolResponse:
FILE: src/aiotieba/api/set_profile/_api.py
function parse_body (line 10) | def parse_body(body: bytes) -> None:
function request (line 16) | async def request(http_core: HttpCore, nick_name: str, sign: str, gender...
FILE: src/aiotieba/api/set_thread_privacy/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fid: int, tid: int, pid: int, is_...
FILE: src/aiotieba/api/sign_forum/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 17) | async def request(http_core: HttpCore, fname: str) -> BoolResponse:
FILE: src/aiotieba/api/sign_forums/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 17) | async def request(http_core: HttpCore) -> BoolResponse:
FILE: src/aiotieba/api/sign_growth/_api.py
function parse_body_web (line 9) | def parse_body_web(body: bytes) -> None:
function request_web (line 15) | async def request_web(http_core: HttpCore, act_type: str) -> BoolResponse:
function parse_body_app (line 32) | def parse_body_app(body: bytes) -> None:
function request_app (line 38) | async def request_app(http_core: HttpCore, act_type: str) -> BoolResponse:
FILE: src/aiotieba/api/sync/_api.py
function parse_body (line 15) | def parse_body(body: bytes) -> tuple[str, str]:
function request (line 26) | async def request(http_core: HttpCore) -> tuple[str, str]:
FILE: src/aiotieba/api/tieba_uid2user_info/_api.py
function pack_proto (line 12) | def pack_proto(tieba_uid: int) -> bytes:
function parse_body (line 20) | def parse_body(body: bytes) -> UserInfo_TUid:
function request_http (line 33) | async def request_http(http_core: HttpCore, tieba_uid: int) -> UserInfo_...
function request_ws (line 50) | async def request_ws(ws_core: WsCore, tieba_uid: int) -> UserInfo_TUid:
FILE: src/aiotieba/api/tieba_uid2user_info/_classdef.py
class UserInfo_TUid (line 13) | class UserInfo_TUid(TbErrorExt):
method from_proto (line 48) | def from_proto(data_proto: TypeMessage) -> UserInfo_TUid:
method __str__ (line 61) | def __str__(self) -> str:
method __eq__ (line 64) | def __eq__(self, obj: UserInfo_TUid) -> bool:
method __hash__ (line 67) | def __hash__(self) -> int:
method __bool__ (line 70) | def __bool__(self) -> bool:
method nick_name (line 74) | def nick_name(self) -> str:
method show_name (line 78) | def show_name(self) -> str:
method log_name (line 82) | def log_name(self) -> str:
FILE: src/aiotieba/api/top/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fname: str, fid: int, tid: int, i...
FILE: src/aiotieba/api/unblock/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fid: int, user_id: int) -> BoolRe...
FILE: src/aiotieba/api/undislike_forum/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fid: int) -> BoolResponse:
FILE: src/aiotieba/api/unfollow_forum/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fid: int) -> BoolResponse:
FILE: src/aiotieba/api/unfollow_user/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, portrait: str) -> BoolResponse:
FILE: src/aiotieba/api/ungood/_api.py
function parse_body (line 9) | def parse_body(body: bytes) -> None:
function request (line 15) | async def request(http_core: HttpCore, fname: str, fid: int, tid: int) -...
FILE: src/aiotieba/client.py
function _try_websocket (line 130) | def _try_websocket(func):
function _force_websocket (line 141) | def _force_websocket(func):
class Client (line 151) | class Client:
method __init__ (line 176) | def __init__(
method __aenter__ (line 204) | async def __aenter__(self) -> Client:
method __aexit__ (line 221) | async def __aexit__(self, exc_type=None, exc_val=None, exc_tb=None) ->...
method __hash__ (line 225) | def __hash__(self) -> int:
method __eq__ (line 228) | def __eq__(self, obj: Client) -> bool:
method account (line 232) | def account(self) -> Account:
method account (line 236) | def account(self, new_account: Account) -> None:
method init_websocket (line 241) | async def init_websocket(self) -> BoolResponse:
method __upload_sec_key (line 259) | async def __upload_sec_key(self) -> None:
method __init_tbs (line 273) | async def __init_tbs(self) -> None:
method get_self_info (line 279) | async def get_self_info(self, require: ReqUInfo = ReqUInfo.ALL) -> Use...
method __login (line 302) | async def __login(self) -> None:
method __init_client_id (line 308) | async def __init_client_id(self) -> None:
method __init_sample_id (line 313) | async def __init_sample_id(self) -> None:
method __sync (line 318) | async def __sync(self) -> None:
method __init_z_id (line 323) | async def __init_z_id(self) -> None:
method get_forum (line 331) | async def get_forum(self, fname_or_fid: str | int) -> get_forum.Forum:
method get_forum_detail (line 349) | async def get_forum_detail(self, fname_or_fid: str | int) -> get_forum...
method __get_fid (line 367) | async def __get_fid(self, fname: str) -> int:
method get_fid (line 377) | async def get_fid(self, fname: str) -> IntResponse:
method __get_fname (line 391) | async def __get_fname(self, fid: int) -> str:
method get_fname (line 404) | async def get_fname(self, fid: int) -> StrResponse:
method get_threads (line 420) | async def get_threads(
method get_posts (line 453) | async def get_posts(
method get_comments (line 494) | async def get_comments(
method get_last_replyers (line 517) | async def get_last_replyers(
method search_exact (line 552) | async def search_exact(
method _get_uinfo_profile (line 584) | async def _get_uinfo_profile(self, uid_or_portrait: str | int) -> prof...
method _get_uinfo_getuserinfo (line 602) | async def _get_uinfo_getuserinfo(self, user_id: int) -> get_uinfo_getu...
method _get_uinfo_getUserInfo (line 625) | async def _get_uinfo_getUserInfo(self, user_id: int) -> get_uinfo_getU...
method _get_uinfo_user_json (line 645) | async def _get_uinfo_user_json(self, user_name: str) -> get_uinfo_user...
method _get_uinfo_panel (line 662) | async def _get_uinfo_panel(self, name_or_portrait: str) -> get_uinfo_p...
method get_user_info (line 680) | async def get_user_info(self, id_: str | int, /, require: ReqUInfo = R...
method tieba_uid2user_info (line 721) | async def tieba_uid2user_info(self, tieba_uid: int) -> tieba_uid2user_...
method get_homepage (line 742) | async def get_homepage(self, id_: str | int, /, pn: int = 1) -> profil...
method get_follows (line 766) | async def get_follows(self, id_: str | int | None = None, /, pn: int =...
method get_fans (line 791) | async def get_fans(self, id_: str | int | None = None, /, pn: int = 1)...
method get_blacklist (line 816) | async def get_blacklist(self) -> get_blacklist.BlacklistUsers:
method get_blacklist_old (line 828) | async def get_blacklist_old(self, pn: int = 1, /, *, rn: int = 10) -> ...
method get_follow_forums (line 846) | async def get_follow_forums(
method get_user_forum_info (line 870) | async def get_user_forum_info(
method get_self_follow_forums (line 902) | async def get_self_follow_forums(self, pn: int = 1, *, rn: int = 200) ...
method get_dislike_forums (line 921) | async def get_dislike_forums(self, pn: int = 1, /, *, rn: int = 20) ->...
method get_self_posts (line 940) | async def get_self_posts(self, pn: int = 1, *, rn: int = 20):
method get_user_posts (line 961) | async def get_user_posts(self, id_: str | int, pn: int = 1, *, rn: int...
method get_self_threads (line 989) | async def get_self_threads(self, pn: int = 1, *, public_only: bool = F...
method get_user_threads (line 1011) | async def get_user_threads(self, id_: str | int, pn: int = 1) -> get_u...
method get_replys (line 1036) | async def get_replys(self, pn: int = 1) -> get_replys.Replys:
method get_ats (line 1053) | async def get_ats(self, pn: int = 1) -> get_ats.Ats:
method get_image_bytes (line 1067) | async def get_image_bytes(self, img_url: str) -> get_images.ImageBytes:
method get_image (line 1081) | async def get_image(self, img_url: str) -> get_images.Image:
method hash2image (line 1095) | async def hash2image(self, raw_hash: str, /, size: Literal["s", "m", "...
method get_portrait (line 1124) | async def get_portrait(self, id_: str | int, /, size: Literal["s", "m"...
method __get_selfinfo_initNickname (line 1156) | async def __get_selfinfo_initNickname(self) -> None:
method __get_selfinfo_moindex (line 1160) | async def __get_selfinfo_moindex(self) -> None:
method get_square_forums (line 1166) | async def get_square_forums(self, cname: str, /, pn: int = 1, *, rn: i...
method get_bawu_info (line 1186) | async def get_bawu_info(self, fname_or_fid: str | int) -> get_bawu_inf...
method add_bawu (line 1205) | async def add_bawu(
method del_bawu (line 1233) | async def del_bawu(
method get_bawu_perm (line 1259) | async def get_bawu_perm(self, fname_or_fid: str | int, /, id_: str | i...
method set_bawu_perm (line 1282) | async def set_bawu_perm(
method get_tab_map (line 1309) | async def get_tab_map(self, fname_or_fid: str | int) -> get_tab_map.Ta...
method get_rank_users (line 1328) | async def get_rank_users(self, fname_or_fid: str | int, /, pn: int = 1...
method get_member_users (line 1345) | async def get_member_users(self, fname_or_fid: str | int, /, pn: int =...
method get_rank_forums (line 1365) | async def get_rank_forums(
method get_blocks (line 1385) | async def get_blocks(self, fname_or_fid: str | int, /, name: str = "",...
method get_recovers (line 1403) | async def get_recovers(
method get_bawu_userlogs (line 1430) | async def get_bawu_userlogs(
method get_bawu_postlogs (line 1468) | async def get_bawu_postlogs(
method get_unblock_appeals (line 1506) | async def get_unblock_appeals(
method get_bawu_blacklist (line 1527) | async def get_bawu_blacklist(
method get_statistics (line 1549) | async def get_statistics(self, fname_or_fid: str | int) -> get_statist...
method get_recom_status (line 1565) | async def get_recom_status(self, fname_or_fid: str | int) -> get_recom...
method block (line 1581) | async def block(
method unblock (line 1610) | async def unblock(self, fname_or_fid: str | int, /, id_: str | int) ->...
method add_bawu_blacklist (line 1635) | async def add_bawu_blacklist(self, fname_or_fid: str | int, /, id_: st...
method del_bawu_blacklist (line 1660) | async def del_bawu_blacklist(self, fname_or_fid: str | int, /, id_: st...
method hide_thread (line 1685) | async def hide_thread(self, fname_or_fid: str | int, /, tid: int) -> B...
method del_thread (line 1703) | async def del_thread(self, fname_or_fid: str | int, /, tid: int) -> Bo...
method del_threads (line 1721) | async def del_threads(self, fname_or_fid: str | int, /, tids: list[int...
method del_post (line 1740) | async def del_post(self, fname_or_fid: str | int, /, tid: int, pid: in...
method del_posts (line 1759) | async def del_posts(
method unhide_thread (line 1781) | async def unhide_thread(self, fname_or_fid: str | int, /, tid: int) ->...
method recover_thread (line 1799) | async def recover_thread(self, fname_or_fid: str | int, /, tid: int) -...
method recover_post (line 1817) | async def recover_post(self, fname_or_fid: str | int, /, pid: int) -> ...
method recover (line 1835) | async def recover(
method good (line 1857) | async def good(self, fname_or_fid: str | int, /, tid: int, *, cname: s...
method ungood (line 1884) | async def ungood(self, fname_or_fid: str | int, /, tid: int) -> BoolRe...
method __get_cid (line 1907) | async def __get_cid(self, fname_or_fid: str | int, /, cname: str = "")...
method get_cid (line 1924) | async def get_cid(self, fname_or_fid: str | int, /, cname: str = "") -...
method top (line 1940) | async def top(self, fname_or_fid: str | int, /, tid: int, *, is_vip: b...
method untop (line 1965) | async def untop(self, fname_or_fid: str | int, /, tid: int, *, is_vip:...
method move (line 1990) | async def move(self, fname_or_fid: str | int, /, tid: int, *, to_tab_i...
method recommend (line 2010) | async def recommend(self, fname_or_fid: str | int, /, tid: int) -> Boo...
method handle_unblock_appeals (line 2027) | async def handle_unblock_appeals(
method agree (line 2048) | async def agree(self, tid: int, pid: int = 0, is_comment: bool = False...
method unagree (line 2070) | async def unagree(self, tid: int, pid: int = 0, is_comment: bool = Fal...
method disagree (line 2088) | async def disagree(self, tid: int, pid: int = 0, is_comment: bool = Fa...
method undisagree (line 2106) | async def undisagree(self, tid: int, pid: int = 0, is_comment: bool = ...
method follow_user (line 2124) | async def follow_user(self, id_: str | int) -> BoolResponse:
method unfollow_user (line 2146) | async def unfollow_user(self, id_: str | int) -> BoolResponse:
method remove_fan (line 2168) | async def remove_fan(self, id_: str | int) -> BoolResponse:
method set_blacklist (line 2191) | async def set_blacklist(self, id_: str | int, *, btype: BlacklistType ...
method add_blacklist_old (line 2215) | async def add_blacklist_old(self, id_: str | int) -> BoolResponse:
method del_blacklist_old (line 2235) | async def del_blacklist_old(self, id_: str | int) -> BoolResponse:
method follow_forum (line 2255) | async def follow_forum(self, fname_or_fid: str | int) -> BoolResponse:
method unfollow_forum (line 2272) | async def unfollow_forum(self, fname_or_fid: str | int) -> BoolResponse:
method dislike_forum (line 2289) | async def dislike_forum(self, fname_or_fid: str | int) -> BoolResponse:
method undislike_forum (line 2305) | async def undislike_forum(self, fname_or_fid: str | int) -> BoolResponse:
method set_thread_private (line 2321) | async def set_thread_private(self, fname_or_fid: str | int, /, tid: in...
method set_thread_public (line 2339) | async def set_thread_public(self, fname_or_fid: str | int, /, tid: int...
method set_profile (line 2357) | async def set_profile(self, nick_name: str, sign: str = "", gender: Ge...
method set_nickname_old (line 2373) | async def set_nickname_old(self, nick_name: str) -> BoolResponse:
method sign_forum (line 2387) | async def sign_forum(self, fname_or_fid: str | int) -> BoolResponse:
method sign_forums (line 2404) | async def sign_forums(self) -> BoolResponse:
method sign_growth (line 2415) | async def sign_growth(self) -> BoolResponse:
method add_post (line 2430) | async def add_post(self, fname_or_fid: str | int, /, tid: int, content...
method send_msg (line 2469) | async def send_msg(self, id_: str | int, content: str) -> BoolResponse:
method set_msg_readed (line 2496) | async def set_msg_readed(self, message: get_group_msg.WsMessage) -> Bo...
method get_group_msg (line 2511) | async def get_group_msg(self, group_ids: list[int], *, get_type: int =...
method send_chatroom_msg (line 2526) | async def send_chatroom_msg(
method _init_blcp (line 2597) | async def _init_blcp(self):
method __get_forum_level (line 2607) | async def __get_forum_level(self, forum_id: int) -> get_forum_level.Le...
method get_roomlist_by_fid (line 2614) | async def get_roomlist_by_fid(self, forum_id: int) -> get_roomlist_by_...
method get_chat_message_queue (line 2630) | def get_chat_message_queue(self) -> asyncio.Queue:
method join_chatroom (line 2641) | async def join_chatroom(self, room_id: int) -> BoolResponse:
FILE: src/aiotieba/config.py
class ProxyConfig (line 10) | class ProxyConfig:
method __init__ (line 22) | def __init__(self, url: str | yarl.URL | None = None, auth: aiohttp.Ba...
method from_env (line 29) | def from_env() -> ProxyConfig:
class TimeoutConfig (line 39) | class TimeoutConfig:
method http_timeout (line 71) | def http_timeout(self) -> aiohttp.ClientTimeout:
method ws_timeout (line 77) | def ws_timeout(self) -> aiohttp.ClientWSTimeout:
FILE: src/aiotieba/core/account.py
class Account (line 12) | class Account:
method __init__ (line 72) | def __init__(self, BDUSS: str = "", STOKEN: str = "") -> None:
method __repr__ (line 90) | def __repr__(self) -> str:
method __hash__ (line 93) | def __hash__(self) -> int:
method __eq__ (line 96) | def __eq__(self, obj: Account) -> bool:
method to_dict (line 99) | def to_dict(self) -> dict[str, str | bytes]:
method from_dict (line 119) | def from_dict(dic: dict[str, str | bytes]) -> Account:
method BDUSS (line 141) | def BDUSS(self) -> str:
method BDUSS (line 149) | def BDUSS(self, new_BDUSS: str) -> None:
method STOKEN (line 155) | def STOKEN(self) -> str:
method STOKEN (line 163) | def STOKEN(self, new_STOKEN: str) -> None:
method android_id (line 169) | def android_id(self) -> str:
method android_id (line 188) | def android_id(self, new_android_id: str) -> None:
method uuid (line 192) | def uuid(self) -> str:
method uuid (line 214) | def uuid(self, new_uuid: str) -> None:
method tbs (line 218) | def tbs(self) -> str:
method tbs (line 235) | def tbs(self, new_tbs: str) -> None:
method client_id (line 239) | def client_id(self) -> str:
method client_id (line 256) | def client_id(self, new_client_id: str) -> None:
method sample_id (line 260) | def sample_id(self) -> str:
method sample_id (line 277) | def sample_id(self, new_sample_id: str) -> None:
method cuid (line 281) | def cuid(self) -> str:
method cuid (line 301) | def cuid(self, new_cuid: str) -> None:
method cuid_galaxy2 (line 305) | def cuid_galaxy2(self) -> str:
method cuid_galaxy2 (line 325) | def cuid_galaxy2(self, new_cuid_galaxy2: str) -> None:
method c3_aid (line 329) | def c3_aid(self) -> str:
method c3_aid (line 349) | def c3_aid(self, new_c3_aid: str) -> None:
method z_id (line 353) | def z_id(self) -> str:
method z_id (line 368) | def z_id(self, new_z_id: str) -> None:
method aes_ecb_sec_key (line 372) | def aes_ecb_sec_key(self) -> bytes:
method aes_ecb_sec_key (line 388) | def aes_ecb_sec_key(self, new_aes_ecb_sec_key: bytes) -> None:
method aes_ecb_chiper (line 392) | def aes_ecb_chiper(self) -> Cipher[modes.ECB]:
method aes_cbc_sec_key (line 409) | def aes_cbc_sec_key(self) -> bytes:
method aes_ecb_sec_key (line 425) | def aes_ecb_sec_key(self, new_aes_ecb_sec_key: bytes) -> None:
method aes_cbc_chiper (line 429) | def aes_cbc_chiper(self) -> Cipher[modes.CBC]:
FILE: src/aiotieba/core/blcp.py
class BLCPCore (line 39) | class BLCPCore:
method __init__ (line 63) | def __init__(
method set_account (line 93) | def set_account(self, new_account: Account) -> None:
method connect (line 96) | async def connect(self) -> None:
method login (line 122) | async def login(self) -> None:
method generate_lcm_token (line 260) | async def generate_lcm_token(self, cuid_galaxy2):
method groupchat (line 299) | async def groupchat(self): # 模拟正常请求,暂不清楚作用
method groupchatv1 (line 330) | async def groupchatv1(self): # 模拟正常请求,暂不清楚作用
method getBDUKfromUserId (line 368) | def getBDUKfromUserId(user_id: str):
method getmsgkey (line 378) | def getmsgkey(bduk: str):
method buildRpcBody (line 382) | def buildRpcBody(serviceId, methodId, correlationId, compress_type=0, ...
method __blcp_dispatch (line 402) | async def __blcp_dispatch(self) -> None:
method joinChatRoom (line 419) | async def joinChatRoom(self, chatroom_id: int) -> bool:
method __heartbeater (line 457) | async def __heartbeater(self, freq: int = 5):
method exitChatRoom (line 462) | async def exitChatRoom(self, chatroom_id: int, room_type: int) -> bool:
method heartbeat (line 466) | async def heartbeat(self):
method enter_chatroom_client_request (line 475) | async def enter_chatroom_client_request(
method fetch_mcast_msg_client_request (line 517) | async def fetch_mcast_msg_client_request(
function generate_sign (line 566) | def generate_sign(json_obj):
class BLCPData (line 581) | class BLCPData:
method __init__ (line 591) | def __init__(
method toBytes (line 615) | def toBytes(self):
class ClientBLCPResponses (line 626) | class ClientBLCPResponses:
method __init__ (line 627) | def __init__(self, reader: StreamReader, writer: StreamWriter):
method __aiter__ (line 631) | def __aiter__(self) -> ClientBLCPResponses:
method __anext__ (line 634) | async def __anext__(self):
method __aenter__ (line 671) | async def __aenter__(self) -> ClientBLCPResponses:
method __aexit__ (line 674) | async def __aexit__(self) -> None:
method close (line 677) | async def close(self):
method parseBLCPResponse (line 681) | def parseBLCPResponse(receivedBytes: bytes) -> (Rpc_pb2.RpcMeta, Lcm_p...
class BLCPResponse (line 720) | class BLCPResponse:
method __init__ (line 735) | def __init__(self, req_id: int, read_timeout: float) -> None:
method read (line 741) | async def read(self) -> BLCPData:
class BLCPWaiter (line 764) | class BLCPWaiter:
method __init__ (line 774) | def __init__(self, read_timeout: float) -> None:
method __cancel_all (line 781) | def __cancel_all(self) -> None:
method new (line 785) | def new(self, req_id: int = None) -> BLCPResponse:
method set_done (line 804) | def set_done(self, req_id: int, data: BLCPData) -> None:
FILE: src/aiotieba/core/http.py
class HttpContainer (line 22) | class HttpContainer:
method __init__ (line 30) | def __init__(self, headers: dict[str, str], cookie_jar: aiohttp.Cookie...
class HttpCore (line 36) | class HttpCore:
method __init__ (line 47) | def __init__(self, account: Account, net_core: NetCore) -> None:
method set_account (line 79) | def set_account(self, new_account: Account) -> None:
method pack_form_request (line 91) | def pack_form_request(self, url: yarl.URL, data: list[tuple[str, str]]...
method pack_proto_request (line 121) | def pack_proto_request(self, url: yarl.URL, data: bytes) -> aiohttp.Cl...
method pack_web_get_request (line 155) | def pack_web_get_request(
method pack_web_form_request (line 187) | def pack_web_form_request(
FILE: src/aiotieba/core/net.py
function check_status_code (line 14) | def check_status_code(response: aiohttp.ClientResponse) -> None:
class NetCore (line 23) | class NetCore:
method __init__ (line 37) | def __init__(
method req2res (line 53) | async def req2res(
method send_request (line 98) | async def send_request(
FILE: src/aiotieba/core/websocket.py
function pack_ws_bytes (line 29) | def pack_ws_bytes(
function parse_ws_bytes (line 69) | def parse_ws_bytes(account: Account, data: bytes) -> tuple[bytes, int, i...
class MsgIDPair (line 101) | class MsgIDPair:
method update_msg_id (line 109) | def update_msg_id(self, curr_id: int) -> None:
class MsgIDManager (line 122) | class MsgIDManager:
method update_msg_id (line 130) | def update_msg_id(self, group_id: int, msg_id: int) -> None:
method get_msg_id (line 145) | def get_msg_id(self, group_id: int) -> int:
method get_record_id (line 158) | def get_record_id(self) -> int:
class WsResponse (line 170) | class WsResponse:
method __init__ (line 185) | def __init__(self, req_id: int, read_timeout: float) -> None:
method read (line 191) | async def read(self) -> bytes:
class WsWaiter (line 214) | class WsWaiter:
method __init__ (line 224) | def __init__(self, read_timeout: float) -> None:
method __cancel_all (line 231) | def __cancel_all(self) -> None:
method new (line 235) | def new(self) -> WsResponse:
method set_done (line 251) | def set_done(self, req_id: int, data: bytes) -> None:
class WsCore (line 267) | class WsCore:
method __init__ (line 282) | def __init__(self, account: Account, net_core: NetCore) -> None:
method set_account (line 294) | def set_account(self, new_account: Account) -> None:
method connect (line 297) | async def connect(self) -> None:
method close (line 364) | async def close(self) -> None:
method __default_callback (line 370) | def __default_callback(self, req_id: int, data: bytes) -> None:
method __ws_dispatch (line 373) | async def __ws_dispatch(self) -> None:
method status (line 389) | def status(self) -> WsStatus:
method send (line 398) | async def send(self, data: bytes, cmd: int, *, compress: bool = False,...
FILE: src/aiotieba/enums.py
class Gender (line 12) | class Gender(enum.IntEnum):
class PrivLike (line 27) | class PrivLike(enum.IntEnum):
method __missing__ (line 44) | def __missing__(cls, _: int) -> PrivLike:
class PrivReply (line 48) | class PrivReply(enum.IntEnum):
method __missing__ (line 65) | def __missing__(cls, _: int) -> PrivReply:
class ThreadType (line 69) | class ThreadType(enum.IntEnum):
method __missing__ (line 98) | def __missing__(cls, _: int) -> ThreadType:
class ReqUInfo (line 102) | class ReqUInfo(enum.Flag):
class ThreadSortType (line 121) | class ThreadSortType(enum.IntEnum):
class PostSortType (line 136) | class PostSortType(enum.IntEnum):
class BawuSearchType (line 151) | class BawuSearchType(enum.IntEnum):
class SearchType (line 164) | class SearchType(enum.IntEnum):
class BawuType (line 179) | class BawuType(StrEnum):
class BawuPermType (line 194) | class BawuPermType(enum.Flag):
class RankForumType (line 215) | class RankForumType(enum.IntEnum):
class BlacklistType (line 232) | class BlacklistType(enum.Flag):
class WsStatus (line 251) | class WsStatus(enum.IntEnum):
class GroupType (line 266) | class GroupType(enum.IntEnum):
class MsgType (line 275) | class MsgType(enum.IntEnum):
FILE: src/aiotieba/exception.py
class TbErrorExt (line 7) | class TbErrorExt:
class BoolResponse (line 16) | class BoolResponse(TbErrorExt):
method __bool__ (line 25) | def __bool__(self) -> bool:
method __int__ (line 28) | def __int__(self) -> int:
method __repr__ (line 31) | def __repr__(self) -> str:
method __hash__ (line 34) | def __hash__(self) -> int:
class IntResponse (line 39) | class IntResponse(TbErrorExt, int):
method __new__ (line 48) | def __new__(cls, i: int = 0) -> IntResponse:
method __init__ (line 52) | def __init__(self, i: int = 0) -> None:
method __repr__ (line 55) | def __repr__(self) -> str:
method __hash__ (line 58) | def __hash__(self) -> int:
class StrResponse (line 63) | class StrResponse(TbErrorExt, str):
method __new__ (line 74) | def __new__(cls, s: str = "") -> StrResponse:
method __init__ (line 78) | def __init__(self, s: str = "") -> None:
method __hash__ (line 81) | def __hash__(self) -> int:
class TiebaServerError (line 85) | class TiebaServerError(RuntimeError):
method __init__ (line 92) | def __init__(self, code: int, msg: str) -> None:
class HTTPStatusError (line 98) | class HTTPStatusError(RuntimeError):
method __init__ (line 105) | def __init__(self, code: int, msg: str) -> None:
class TiebaValueError (line 111) | class TiebaValueError(RuntimeError):
class ContentTypeError (line 117) | class ContentTypeError(RuntimeError):
FILE: src/aiotieba/helper/cache.py
class ForumInfoCache (line 7) | class ForumInfoCache:
method get_fid (line 16) | def get_fid(cls, fname: str) -> int:
method get_fname (line 30) | def get_fname(cls, fid: int) -> str:
method add_forum (line 44) | def add_forum(cls, fname: str, fid: int) -> None:
FILE: src/aiotieba/helper/crypto/__init__.py
function sign (line 7) | def sign(data: list[tuple[str, str | int]]) -> list[tuple[str, str | int]]:
FILE: src/aiotieba/helper/crypto/crypto.pyi
function cuid_galaxy2 (line 1) | def cuid_galaxy2(android_id: str) -> str:
function c3_aid (line 18) | def c3_aid(android_id: str, uuid: str) -> str:
function rc4_42 (line 36) | def rc4_42(xyus_md5_str: str, aes_cbc_sec_key: bytes) -> bytes:
function sign (line 48) | def sign(data: list[tuple[str, str | int]]) -> str:
function enuid (line 59) | def enuid(cuid_galaxy2: str) -> str:
FILE: src/aiotieba/helper/crypto/include/mbedtls/alignment.h
function mbedtls_get_unaligned_uint16 (line 53) | inline uint16_t mbedtls_get_unaligned_uint16(const void* p)
function mbedtls_put_unaligned_uint16 (line 67) | inline void mbedtls_put_unaligned_uint16(void* p, uint16_t x) { memcpy(p...
function mbedtls_get_unaligned_uint32 (line 76) | inline uint32_t mbedtls_get_unaligned_uint32(const void* p)
function mbedtls_put_unaligned_uint32 (line 90) | inline void mbedtls_put_unaligned_uint32(void* p, uint32_t x) { memcpy(p...
function mbedtls_get_unaligned_uint64 (line 99) | inline uint64_t mbedtls_get_unaligned_uint64(const void* p)
function mbedtls_put_unaligned_uint64 (line 113) | inline void mbedtls_put_unaligned_uint64(void* p, uint64_t x) { memcpy(p...
function mbedtls_bswap16 (line 183) | static inline uint16_t mbedtls_bswap16(uint16_t x) { return (x & 0x00ff)...
function mbedtls_bswap32 (line 188) | static inline uint32_t mbedtls_bswap32(uint32_t x)
function mbedtls_bswap64 (line 196) | static inline uint64_t mbedtls_bswap64(uint64_t x)
FILE: src/aiotieba/helper/crypto/include/mbedtls/common.h
function mbedtls_xor (line 114) | inline void mbedtls_xor(unsigned char* r, const unsigned char* a, const ...
FILE: src/aiotieba/helper/crypto/include/mbedtls/md5.h
type mbedtls_md5_context (line 45) | typedef struct mbedtls_md5_context {
FILE: src/aiotieba/helper/crypto/include/mbedtls/sha1.h
type mbedtls_sha1_context (line 48) | typedef struct mbedtls_sha1_context {
FILE: src/aiotieba/helper/crypto/include/xxHash/xxhash.h
type XXH_errorcode (line 573) | typedef enum {
type XXH32_hash_t (line 588) | typedef uint32_t XXH32_hash_t;
type XXH32_hash_t (line 598) | typedef uint32_t XXH32_hash_t;
type XXH32_hash_t (line 603) | typedef unsigned int XXH32_hash_t;
type XXH32_hash_t (line 605) | typedef unsigned long XXH32_hash_t;
type XXH32_state_t (line 654) | typedef struct XXH32_state_s XXH32_state_t;
type XXH32_canonical_t (line 755) | typedef struct {
type XXH64_hash_t (line 858) | typedef uint64_t XXH64_hash_t;
type XXH64_hash_t (line 867) | typedef uint64_t XXH64_hash_t;
type XXH64_hash_t (line 872) | typedef unsigned long XXH64_hash_t;
type XXH64_hash_t (line 875) | typedef unsigned long long XXH64_hash_t;
type XXH64_state_t (line 919) | typedef struct XXH64_state_s XXH64_state_t;
type XXH64_canonical_t (line 1020) | typedef struct { unsigned char digest[sizeof(XXH64_hash_t)]; } XXH64_can...
type XXH3_state_t (line 1236) | typedef struct XXH3_state_s XXH3_state_t;
type XXH128_hash_t (line 1375) | typedef struct {
type XXH128_canonical_t (line 1598) | typedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_c...
type XXH32_state_s (line 1665) | struct XXH32_state_s {
type XXH64_state_s (line 1689) | struct XXH64_state_s {
type XXH3_state_s (line 1765) | struct XXH3_state_s {
function XXH_CONSTF (line 2364) | static XXH_CONSTF void* XXH_malloc(size_t s) { (void)s; return NULL; }
function XXH_free (line 2365) | static void XXH_free(void* p) { (void)p; }
function XXH_MALLOCF (line 2379) | static XXH_MALLOCF void* XXH_malloc(size_t s) { return malloc(s); }
function XXH_free (line 2385) | static void XXH_free(void* p) { free(p); }
type xxh_u8 (line 2565) | typedef uint8_t xxh_u8;
type xxh_u8 (line 2567) | typedef unsigned char xxh_u8;
type XXH32_hash_t (line 2569) | typedef XXH32_hash_t xxh_u32;
function xxh_u32 (line 2641) | static xxh_u32 XXH_read32(const void* memPtr) { return *(const xxh_u32*)...
type unalign (line 2653) | typedef union { xxh_u32 u32; } __attribute__((__packed__)) unalign;
function xxh_u32 (line 2655) | static xxh_u32 XXH_read32(const void* ptr)
function xxh_u32 (line 2667) | static xxh_u32 XXH_read32(const void* memPtr)
function XXH_isLittleEndian (line 2714) | static int XXH_isLittleEndian(void)
function xxh_u32 (line 2828) | static xxh_u32 XXH_swap32 (xxh_u32 x)
type XXH_alignment (line 2846) | typedef enum {
function XXH_FORCE_INLINE (line 2858) | XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* memPtr)
function XXH_FORCE_INLINE (line 2867) | XXH_FORCE_INLINE xxh_u32 XXH_readBE32(const void* memPtr)
function XXH_FORCE_INLINE (line 2877) | XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* ptr)
function xxh_u32 (line 2882) | static xxh_u32 XXH_readBE32(const void* ptr)
function XXH_FORCE_INLINE (line 2888) | XXH_FORCE_INLINE xxh_u32
function XXH_versionNumber (line 2903) | XXH_PUBLIC_API unsigned XXH_versionNumber (void) { return XXH_VERSION_NU...
function xxh_u32 (line 2943) | static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input)
function xxh_u32 (line 3000) | static xxh_u32 XXH32_avalanche(xxh_u32 hash)
function XXH_FORCE_INLINE (line 3016) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 3032) | XXH_FORCE_INLINE const xxh_u8 *
function xxh_u32 (line 3059) | xxh_u32
function XXH_PUREF (line 3082) | static XXH_PUREF xxh_u32
function xxh_u32 (line 3171) | xxh_u32
function XXH_PUBLIC_API (line 3195) | XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_...
function XXH_PUBLIC_API (line 3218) | XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void)
function XXH_PUBLIC_API (line 3223) | XXH_PUBLIC_API XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr)
function XXH_PUBLIC_API (line 3230) | XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dstState, const XXH32...
function XXH_PUBLIC_API (line 3236) | XXH_PUBLIC_API XXH_errorcode XXH32_reset(XXH32_state_t* statePtr, XXH32_...
function XXH_PUBLIC_API (line 3246) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 3293) | XXH_PUBLIC_API XXH32_hash_t XXH32_digest(const XXH32_state_t* state)
function XXH_PUBLIC_API (line 3312) | XXH_PUBLIC_API void XXH32_canonicalFromHash(XXH32_canonical_t* dst, XXH3...
function XXH_PUBLIC_API (line 3319) | XXH_PUBLIC_API XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonica...
type XXH64_hash_t (line 3337) | typedef XXH64_hash_t xxh_u64;
function xxh_u64 (line 3351) | static xxh_u64 XXH_read64(const void* memPtr)
type unalign64 (line 3366) | typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((__packed__)) ...
function xxh_u64 (line 3368) | static xxh_u64 XXH_read64(const void* ptr)
function xxh_u64 (line 3380) | static xxh_u64 XXH_read64(const void* memPtr)
function xxh_u64 (line 3394) | static xxh_u64 XXH_swap64(xxh_u64 x)
function XXH_FORCE_INLINE (line 3411) | XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* memPtr)
function XXH_FORCE_INLINE (line 3424) | XXH_FORCE_INLINE xxh_u64 XXH_readBE64(const void* memPtr)
function XXH_FORCE_INLINE (line 3438) | XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* ptr)
function xxh_u64 (line 3443) | static xxh_u64 XXH_readBE64(const void* ptr)
function XXH_FORCE_INLINE (line 3449) | XXH_FORCE_INLINE xxh_u64
function xxh_u64 (line 3484) | static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input)
function xxh_u64 (line 3509) | static xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val)
function xxh_u64 (line 3518) | static xxh_u64 XXH64_avalanche(xxh_u64 hash)
function XXH_FORCE_INLINE (line 3535) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 3551) | XXH_FORCE_INLINE const xxh_u8 *
function xxh_u64 (line 3587) | xxh_u64
function xxh_u64 (line 3625) | xxh_u64
function xxh_u64 (line 3669) | xxh_u64
function XXH_PUBLIC_API (line 3693) | XXH_PUBLIC_API XXH64_hash_t XXH64 (XXH_NOESCAPE const void* input, size_...
function XXH_PUBLIC_API (line 3715) | XXH_PUBLIC_API XXH64_state_t* XXH64_createState(void)
function XXH_PUBLIC_API (line 3720) | XXH_PUBLIC_API XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr)
function XXH_PUBLIC_API (line 3727) | XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState...
function XXH_PUBLIC_API (line 3733) | XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH_NOESCAPE XXH64_state_t* sta...
function XXH_PUBLIC_API (line 3742) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 3788) | XXH_PUBLIC_API XXH64_hash_t XXH64_digest(XXH_NOESCAPE const XXH64_state_...
function XXH_PUBLIC_API (line 3807) | XXH_PUBLIC_API void XXH64_canonicalFromHash(XXH_NOESCAPE XXH64_canonical...
function XXH_PUBLIC_API (line 3815) | XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const X...
type uint64x2_t (line 4120) | typedef uint64x2_t xxh_aliasing_uint64x2_t
function XXH_FORCE_INLINE (line 4136) | XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr) /* silence -W...
function XXH_FORCE_INLINE (line 4141) | XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr)
function XXH_FORCE_INLINE (line 4156) | XXH_FORCE_INLINE uint64x2_t
function XXH_FORCE_INLINE (line 4163) | XXH_FORCE_INLINE uint64x2_t
function XXH_FORCE_INLINE (line 4171) | XXH_FORCE_INLINE uint64x2_t
function XXH_FORCE_INLINE (line 4178) | XXH_FORCE_INLINE uint64x2_t
type xxh_u64x2 (line 4269) | typedef __vector unsigned long long xxh_u64x2;
type xxh_u8x16 (line 4270) | typedef __vector unsigned char xxh_u8x16;
type xxh_u32x4 (line 4271) | typedef __vector unsigned xxh_u32x4;
type xxh_u64x2 (line 4276) | typedef xxh_u64x2 xxh_aliasing_u64x2
function XXH_FORCE_INLINE (line 4297) | XXH_FORCE_INLINE xxh_u64x2 XXH_vec_revb(xxh_u64x2 val)
function XXH_FORCE_INLINE (line 4309) | XXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr)
function XXH_FORCE_INLINE (line 4337) | XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mulo(xxh_u32x4 a, xxh_u32x4 b)
function XXH_FORCE_INLINE (line 4343) | XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mule(xxh_u32x4 a, xxh_u32x4 b)
function XXH_FORCE_INLINE (line 4437) | XXH_FORCE_INLINE xxh_u64
function XXH128_hash_t (line 4464) | static XXH128_hash_t
function xxh_u64 (line 4598) | static xxh_u64
function xxh_u64 (line 4606) | xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift)
function XXH64_hash_t (line 4616) | static XXH64_hash_t XXH3_avalanche(xxh_u64 h64)
function XXH64_hash_t (line 4629) | static XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len)
function XXH64_hash_t (line 4673) | XXH64_hash_t
function XXH64_hash_t (line 4695) | XXH64_hash_t
function XXH64_hash_t (line 4711) | XXH64_hash_t
function XXH64_hash_t (line 4728) | XXH64_hash_t
function XXH_FORCE_INLINE (line 4765) | XXH_FORCE_INLINE xxh_u64 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input,
function XXH64_hash_t (line 4798) | XXH64_hash_t
function XXH64_hash_t (line 4834) | XXH64_hash_t
function XXH_FORCE_INLINE (line 4946) | XXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64)
type xxh_i64 (line 4960) | typedef int64_t xxh_i64;
type xxh_i64 (line 4963) | typedef long long xxh_i64;
function XXH3_accumulate_512_avx512 (line 4997) | void
function XXH_FORCE_INLINE (line 5024) | XXH_FORCE_INLINE XXH_TARGET_AVX512 XXH3_ACCUMULATE_TEMPLATE(avx512)
function XXH3_initCustomSecret_avx512 (line 5070) | void
function XXH3_accumulate_512_avx2 (line 5100) | void
function XXH_FORCE_INLINE (line 5133) | XXH_FORCE_INLINE XXH_TARGET_AVX2 XXH3_ACCUMULATE_TEMPLATE(avx2)
function XXH3_initCustomSecret_avx2 (line 5164) | void XXH3_initCustomSecret_avx2(void* XXH_RESTRICT customSecret, xxh_u64...
function XXH3_accumulate_512_sse2 (line 5206) | void
function XXH_FORCE_INLINE (line 5240) | XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
function XXH3_initCustomSecret_sse2 (line 5271) | void XXH3_initCustomSecret_sse2(void* XXH_RESTRICT customSecret, xxh_u64...
function XXH_FORCE_INLINE (line 5349) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5475) | XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(neon)
function XXH_FORCE_INLINE (line 5536) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5570) | XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(vsx)
function XXH_FORCE_INLINE (line 5606) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5646) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5716) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5748) | XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(lsx)
function XXH_FORCE_INLINE (line 5780) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5812) | XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(lasx)
function XXH_FORCE_INLINE (line 5852) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5895) | XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(rvv)
function XXH_FORCE_INLINE (line 5927) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 5985) | XXH_FORCE_INLINE xxh_u64
function XXH_FORCE_INLINE (line 5994) | XXH_FORCE_INLINE xxh_u64
function XXH_FORCE_INLINE (line 6008) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 6031) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 6048) | XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(scalar)
function XXH_FORCE_INLINE (line 6080) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 6089) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 6230) | XXH_FORCE_INLINE void
function XXH_FORCE_INLINE (line 6263) | XXH_FORCE_INLINE xxh_u64
function XXH_PUREF (line 6271) | static XXH_PUREF XXH64_hash_t
function XXH_PUREF (line 6301) | static XXH_PUREF XXH64_hash_t
function XXH_FORCE_INLINE (line 6310) | XXH_FORCE_INLINE XXH64_hash_t
function XXH3_WITH_SECRET_INLINE (line 6333) | XXH3_WITH_SECRET_INLINE XXH64_hash_t
function XXH64_hash_t (line 6347) | XXH64_hash_t
function XXH_FORCE_INLINE (line 6366) | XXH_FORCE_INLINE XXH64_hash_t
function XXH_NO_INLINE (line 6389) | XXH_NO_INLINE XXH64_hash_t
type XXH64_hash_t (line 6399) | typedef XXH64_hash_t (*XXH3_hashLong64_f)(const void* XXH_RESTRICT, size_t,
function XXH_FORCE_INLINE (line 6402) | XXH_FORCE_INLINE XXH64_hash_t
function XXH_PUBLIC_API (line 6428) | XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, ...
function XXH_PUBLIC_API (line 6434) | XXH_PUBLIC_API XXH64_hash_t
function XXH_PUBLIC_API (line 6441) | XXH_PUBLIC_API XXH64_hash_t
function XXH_PUBLIC_API (line 6447) | XXH_PUBLIC_API XXH64_hash_t
function XXH_MALLOCF (line 6481) | static XXH_MALLOCF void* XXH_alignedMalloc(size_t s, size_t align)
function XXH_alignedFree (line 6512) | static void XXH_alignedFree(void* p)
function XXH_PUBLIC_API (line 6534) | XXH_PUBLIC_API XXH3_state_t* XXH3_createState(void)
function XXH_PUBLIC_API (line 6554) | XXH_PUBLIC_API XXH_errorcode XXH3_freeState(XXH3_state_t* statePtr)
function XXH_PUBLIC_API (line 6561) | XXH_PUBLIC_API void
function XXH3_reset_internal (line 6567) | static void
function XXH_PUBLIC_API (line 6595) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6604) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6615) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 6627) | XXH_PUBLIC_API XXH_errorcode
function XXH_FORCE_INLINE (line 6655) | XXH_FORCE_INLINE const xxh_u8 *
function XXH_NO_INLINE (line 6783) | XXH_NO_INLINE XXH_errorcode
function XXH_PUBLIC_API (line 6791) | XXH_PUBLIC_API XXH_errorcode
function XXH_FORCE_INLINE (line 6798) | XXH_FORCE_INLINE void
function XXH_PUBLIC_API (line 6836) | XXH_PUBLIC_API XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_...
function XXH128_hash_t (line 6870) | XXH128_hash_t
function XXH128_hash_t (line 6899) | XXH128_hash_t
function XXH128_hash_t (line 6926) | XXH128_hash_t
function XXH128_hash_t (line 7001) | XXH128_hash_t
function XXH_FORCE_INLINE (line 7020) | XXH_FORCE_INLINE XXH128_hash_t
function XXH128_hash_t (line 7032) | XXH128_hash_t
function XXH128_hash_t (line 7076) | XXH128_hash_t
function XXH_PUREF (line 7134) | static XXH_PUREF XXH128_hash_t
function XXH_FORCE_INLINE (line 7145) | XXH_FORCE_INLINE XXH128_hash_t
function XXH128_hash_t (line 7164) | XXH128_hash_t
function XXH3_WITH_SECRET_INLINE (line 7181) | XXH3_WITH_SECRET_INLINE XXH128_hash_t
function XXH_FORCE_INLINE (line 7191) | XXH_FORCE_INLINE XXH128_hash_t
function XXH_NO_INLINE (line 7212) | XXH_NO_INLINE XXH128_hash_t
type XXH128_hash_t (line 7221) | typedef XXH128_hash_t (*XXH3_hashLong128_f)(const void* XXH_RESTRICT, si...
function XXH_FORCE_INLINE (line 7224) | XXH_FORCE_INLINE XXH128_hash_t
function XXH_PUBLIC_API (line 7249) | XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* input...
function XXH_PUBLIC_API (line 7257) | XXH_PUBLIC_API XXH128_hash_t
function XXH_PUBLIC_API (line 7266) | XXH_PUBLIC_API XXH128_hash_t
function XXH_PUBLIC_API (line 7275) | XXH_PUBLIC_API XXH128_hash_t
function XXH_PUBLIC_API (line 7284) | XXH_PUBLIC_API XXH128_hash_t
function XXH_PUBLIC_API (line 7299) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 7306) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 7313) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 7320) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 7327) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 7334) | XXH_PUBLIC_API XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH...
function XXH_PUBLIC_API (line 7354) | XXH_PUBLIC_API int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2)
function XXH_PUBLIC_API (line 7365) | XXH_PUBLIC_API int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESC...
function XXH_PUBLIC_API (line 7378) | XXH_PUBLIC_API void
function XXH_PUBLIC_API (line 7391) | XXH_PUBLIC_API XXH128_hash_t
function XXH_FORCE_INLINE (line 7408) | XXH_FORCE_INLINE void XXH3_combine16(void* dst, XXH128_hash_t h128)
function XXH_PUBLIC_API (line 7415) | XXH_PUBLIC_API XXH_errorcode
function XXH_PUBLIC_API (line 7460) | XXH_PUBLIC_API void
FILE: src/aiotieba/helper/crypto/src/base32/base32.c
function tbc_base32_encode (line 23) | void tbc_base32_encode(const unsigned char* src, int srcLen, unsigned ch...
FILE: src/aiotieba/helper/crypto/src/crc/crc32.c
function tbc_crc32 (line 47) | uint32_t tbc_crc32(const unsigned char* src, size_t srcLen, uint32_t pre...
FILE: src/aiotieba/helper/crypto/src/mbedtls/md5.c
function mbedtls_md5_init (line 28) | void mbedtls_md5_init(mbedtls_md5_context *ctx)
function mbedtls_md5_starts (line 36) | void mbedtls_md5_starts(mbedtls_md5_context *ctx)
function mbedtls_internal_md5_process (line 47) | void mbedtls_internal_md5_process(mbedtls_md5_context *ctx,
function mbedtls_md5_update (line 179) | void mbedtls_md5_update(mbedtls_md5_context *ctx,
function mbedtls_md5_finish (line 222) | void mbedtls_md5_finish(mbedtls_md5_context *ctx,
function mbedtls_md5 (line 269) | void mbedtls_md5(const unsigned char *input,
FILE: src/aiotieba/helper/crypto/src/mbedtls/sha1.c
function mbedtls_sha1_init (line 28) | void mbedtls_sha1_init(mbedtls_sha1_context *ctx)
function mbedtls_sha1_starts (line 36) | void mbedtls_sha1_starts(mbedtls_sha1_context *ctx)
function mbedtls_internal_sha1_process (line 48) | void mbedtls_internal_sha1_process(mbedtls_sha1_context *ctx,
function mbedtls_sha1_update (line 214) | void mbedtls_sha1_update(mbedtls_sha1_context *ctx,
function mbedtls_sha1_finish (line 259) | void mbedtls_sha1_finish(mbedtls_sha1_context *ctx,
function mbedtls_sha1 (line 307) | void mbedtls_sha1(const unsigned char *input,
FILE: src/aiotieba/helper/crypto/src/tbcrypto/bb64.c
function BB64ResultLen (line 24) | unsigned int BB64ResultLen(int srcLen) { return 4 * ((srcLen + 2) / 3u) ...
function GC02 (line 96) | unsigned int GC02(unsigned char *preResultArray, unsigned int inputArray...
function tbc_BB64Encode (line 134) | void tbc_BB64Encode(const unsigned char *inputArray, int srcLen, int mod...
FILE: src/aiotieba/helper/crypto/src/tbcrypto/cuid.c
function __tbc_update (line 23) | static void __tbc_update(uint64_t* sec, uint64_t hashVal, uint64_t start...
function __tbc_writeBuffer (line 47) | static void __tbc_writeBuffer(unsigned char* buffer, const uint64_t sec) {
function tbc_heliosHash (line 55) | void tbc_heliosHash(const unsigned char* src, size_t srcSize, unsigned c...
function tbc_cuid_galaxy2 (line 93) | void tbc_cuid_galaxy2(const unsigned char* androidID, unsigned char* dst) {
function tbc_c3_aid (line 131) | void tbc_c3_aid(const unsigned char* androidID, const unsigned char* uui...
FILE: src/aiotieba/helper/crypto/src/tbcrypto/lib.c
function PyObject (line 9) | PyObject* cuid_galaxy2(PyObject* Py_UNUSED(self), PyObject* args) {
function PyObject (line 29) | PyObject* c3_aid(PyObject* Py_UNUSED(self), PyObject* args) {
function PyObject (line 55) | PyObject* rc4_42(PyObject* Py_UNUSED(self), PyObject* args) {
function PyObject (line 81) | PyObject* enuid(PyObject* Py_UNUSED(self), PyObject* args) {
function PyMODINIT_FUNC (line 113) | PyMODINIT_FUNC PyInit_crypto(void) {
FILE: src/aiotieba/helper/crypto/src/tbcrypto/rc442.c
type rc4_42_context (line 7) | typedef struct rc4_42_context {
function __tbc_rc442Setup (line 13) | static void __tbc_rc442Setup(rc4_42_context* ctx, const unsigned char* k...
function __tbc_rc442Crypt (line 36) | static void __tbc_rc442Crypt(rc4_42_context* ctx, const unsigned char* s...
function tbc_rc4_42 (line 62) | void tbc_rc4_42(const unsigned char* xyusMd5Str, const unsigned char* cb...
FILE: src/aiotieba/helper/crypto/src/tbcrypto/sign.c
function __tbc_pyStr2UTF8 (line 13) | static void __tbc_pyStr2UTF8(const char** dst, size_t* dstSize, PyObject...
function PyObject (line 23) | PyObject* sign(PyObject* Py_UNUSED(self), PyObject* args) {
FILE: src/aiotieba/helper/utils.py
function pack_json (line 23) | def pack_json(obj: Any) -> str:
function is_portrait (line 35) | def is_portrait(portrait: Any) -> bool:
function is_user_name (line 43) | def is_user_name(user_name: Any) -> bool:
function default_datetime (line 51) | def default_datetime() -> datetime:
function timeout (line 55) | def timeout(delay: float, loop: asyncio.AbstractEventLoop) -> async_time...
function deprecated (line 66) | def deprecated(reason):
function handle_exception (line 78) | def handle_exception(
FILE: src/aiotieba/logging.py
class TiebaLogger (line 14) | class TiebaLogger(logging.Logger):
method __init__ (line 23) | def __init__(self, name: str = "", stream_log_level: int = logging.DEB...
function get_logger (line 37) | def get_logger() -> TiebaLogger:
function set_logger (line 53) | def set_logger(new_logger: logging.Logger) -> None:
function set_formatter (line 65) | def set_formatter(formatter: logging.Formatter) -> None:
function enable_filelog (line 84) | def enable_filelog(log_level: int = logging.INFO, log_dir: Path = Path("...
FILE: tests/conftest.py
function client (line 9) | async def client():
FILE: tests/test_crypto.py
function test_clib (line 8) | async def test_clib(client: tb.Client):
FILE: tests/test_get_ats.py
function test_Ats (line 8) | async def test_Ats(client: tb.Client):
FILE: tests/test_get_blocks.py
function test_Blocks (line 8) | async def test_Blocks(client: tb.Client):
FILE: tests/test_get_comments.py
function test_Comments (line 8) | async def test_Comments(client: tb.Client):
function test_FragLink (line 154) | async def test_FragLink(client: tb.Client):
FILE: tests/test_get_fans.py
function test_Fans (line 8) | async def test_Fans(client: tb.Client):
FILE: tests/test_get_follow_forums.py
function test_FollowForums (line 8) | async def test_FollowForums(client: tb.Client):
FILE: tests/test_get_follows.py
function test_Follows (line 8) | async def test_Follows(client: tb.Client):
FILE: tests/test_get_forum_detail.py
function test_Forum_detail (line 8) | async def test_Forum_detail(client: tb.Client):
FILE: tests/test_get_homepage.py
function test_Homepage (line 8) | async def test_Homepage(client: tb.Client):
FILE: tests/test_get_posts.py
function test_Posts (line 8) | async def test_Posts(client: tb.Client):
function test_ShareThread_pt (line 148) | async def test_ShareThread_pt(client: tb.Client):
FILE: tests/test_get_recovers.py
function test_Recovers (line 8) | async def test_Recovers(client: tb.Client):
FILE: tests/test_get_threads.py
function test_Threads (line 8) | async def test_Threads(client: tb.Client):
FILE: tests/test_get_user_info.py
function test_get_user_info (line 8) | async def test_get_user_info(client: tb.Client):
FILE: tests/test_get_user_posts.py
function test_get_user_posts (line 8) | async def test_get_user_posts(client: tb.Client):
Condensed preview — 504 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,227K chars).
[
{
"path": ".clang-format",
"chars": 148,
"preview": "BasedOnStyle: Google\nIndentWidth: 4\nColumnLimit: 120\n---\nLanguage: C\nAccessModifierOffset: -4\nIndentPPDirectives: AfterH"
},
{
"path": ".gitattributes",
"chars": 158,
"preview": "* text=auto eol=lf\n*.py text eol=lf\n*.pyi text eol=lf\n*.pyx text eol=lf\n*.pxd text eol=lf\n*.h text eol=lf\n*.c text eol=l"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 158,
"preview": "---\nname: Bug report\nabout: Bug报告\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**简要描述这个bug**\n\n...\n\n**如何复现**\n\n在何种场景下用何种操作复现\n\n"
},
{
"path": ".github/ISSUE_TEMPLATE/discussion.md",
"chars": 73,
"preview": "---\nname: Discussion\nabout: 技术交流\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 121,
"preview": "---\nname: Feature request\nabout: 功能需求\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**我需要什么功能**\n\n...\n\n**我想将这个功能应用于何种场景**\n\n..."
},
{
"path": ".github/dependabot.yml",
"chars": 263,
"preview": "version: 2\n\nupdates:\n - package-ecosystem: \"pip\"\n directory: \"/\"\n target-branch: \"develop\"\n schedule:\n in"
},
{
"path": ".github/workflows/CI-beta.yml",
"chars": 606,
"preview": "name: CI-beta\n\non:\n workflow_dispatch:\n\njobs:\n test-beta:\n name: Test-beta\n runs-on: ubuntu-latest\n\n environm"
},
{
"path": ".github/workflows/CI.yml",
"chars": 898,
"preview": "name: CI\n\non:\n schedule:\n - cron: \"42 6 * * *\"\n push:\n branches: [develop]\n paths:\n - \"src/**\"\n - \""
},
{
"path": ".github/workflows/Pages.yml",
"chars": 1088,
"preview": "name: Pages\n\non:\n push:\n branches: [develop]\n paths:\n - \"mkdocs.yml\"\n - \"docs/**\"\n - \"pyproject.to"
},
{
"path": ".github/workflows/Publish.yml",
"chars": 1795,
"preview": "name: Publish\n\non:\n push:\n tags:\n - \"*\"\n workflow_dispatch:\n\njobs:\n build_wheels:\n name: Build wheels on $"
},
{
"path": ".gitignore",
"chars": 133,
"preview": ".*/\n!.github/\n*_cache/\n*.py[cd]\n__pycache__\n\nlog/\ndist/\n*build*/\n\n.python-version\n*.lock\n\n/*.py\naccount.toml\ndatabase.to"
},
{
"path": "CMakeLists.txt",
"chars": 412,
"preview": "cmake_minimum_required(VERSION 3.15 FATAL_ERROR)\n\nif (NOT SKBUILD_PROJECT_NAME)\n set(SKBUILD_PROJECT_NAME \"aiotieba\")"
},
{
"path": "LICENSE",
"chars": 1211,
"preview": "This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, c"
},
{
"path": "README.md",
"chars": 2834,
"preview": "<p align=\"center\">\n<a href=\"https://socialify.git.ci\">\n <img src=\"https://user-images.githubusercontent.com/48282276/"
},
{
"path": "docs/CNAME",
"chars": 11,
"preview": "aiotieba.cc"
},
{
"path": "docs/css/custom.css",
"chars": 167,
"preview": "[data-md-color-scheme=slate] {\n --md-hue: 210;\n --md-default-bg-color: hsla(var(--md-hue), 15%, 10%, 1);\n --md-typese"
},
{
"path": "docs/index.md",
"chars": 1973,
"preview": "# \n\n<p align=\"center\">\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubuserco"
},
{
"path": "docs/ref/classdef/ats.md",
"chars": 35,
"preview": "::: aiotieba.api.get_ats._classdef\n"
},
{
"path": "docs/ref/classdef/bawu_blacklist.md",
"chars": 46,
"preview": "::: aiotieba.api.get_bawu_blacklist._classdef\n"
},
{
"path": "docs/ref/classdef/bawu_info.md",
"chars": 41,
"preview": "::: aiotieba.api.get_bawu_info._classdef\n"
},
{
"path": "docs/ref/classdef/bawu_perm.md",
"chars": 41,
"preview": "::: aiotieba.api.get_bawu_perm._classdef\n"
},
{
"path": "docs/ref/classdef/bawu_postlogs.md",
"chars": 45,
"preview": "::: aiotieba.api.get_bawu_postlogs._classdef\n"
},
{
"path": "docs/ref/classdef/bawu_userlogs.md",
"chars": 45,
"preview": "::: aiotieba.api.get_bawu_userlogs._classdef\n"
},
{
"path": "docs/ref/classdef/blacklist.md",
"chars": 41,
"preview": "::: aiotieba.api.get_blacklist._classdef\n"
},
{
"path": "docs/ref/classdef/blacklist_old.md",
"chars": 45,
"preview": "::: aiotieba.api.get_blacklist_old._classdef\n"
},
{
"path": "docs/ref/classdef/blocks.md",
"chars": 38,
"preview": "::: aiotieba.api.get_blocks._classdef\n"
},
{
"path": "docs/ref/classdef/comments.md",
"chars": 40,
"preview": "::: aiotieba.api.get_comments._classdef\n"
},
{
"path": "docs/ref/classdef/dislike_forums.md",
"chars": 46,
"preview": "::: aiotieba.api.get_dislike_forums._classdef\n"
},
{
"path": "docs/ref/classdef/fans.md",
"chars": 36,
"preview": "::: aiotieba.api.get_fans._classdef\n"
},
{
"path": "docs/ref/classdef/follow_forums.md",
"chars": 45,
"preview": "::: aiotieba.api.get_follow_forums._classdef\n"
},
{
"path": "docs/ref/classdef/follows.md",
"chars": 39,
"preview": "::: aiotieba.api.get_follows._classdef\n"
},
{
"path": "docs/ref/classdef/forum_detail.md",
"chars": 44,
"preview": "::: aiotieba.api.get_forum_detail._classdef\n"
},
{
"path": "docs/ref/classdef/group_msg.md",
"chars": 41,
"preview": "::: aiotieba.api.get_group_msg._classdef\n"
},
{
"path": "docs/ref/classdef/images.md",
"chars": 38,
"preview": "::: aiotieba.api.get_images._classdef\n"
},
{
"path": "docs/ref/classdef/last_replyers.md",
"chars": 45,
"preview": "::: aiotieba.api.get_last_replyers._classdef\n"
},
{
"path": "docs/ref/classdef/member_users.md",
"chars": 44,
"preview": "::: aiotieba.api.get_member_users._classdef\n"
},
{
"path": "docs/ref/classdef/posts.md",
"chars": 37,
"preview": "::: aiotieba.api.get_posts._classdef\n"
},
{
"path": "docs/ref/classdef/profile.md",
"chars": 35,
"preview": "::: aiotieba.api.profile._classdef\n"
},
{
"path": "docs/ref/classdef/rank_users.md",
"chars": 42,
"preview": "::: aiotieba.api.get_rank_users._classdef\n"
},
{
"path": "docs/ref/classdef/recom_status.md",
"chars": 44,
"preview": "::: aiotieba.api.get_recom_status._classdef\n"
},
{
"path": "docs/ref/classdef/recover_thread.md",
"chars": 44,
"preview": "::: aiotieba.api.get_recover_info._classdef\n"
},
{
"path": "docs/ref/classdef/recovers.md",
"chars": 40,
"preview": "::: aiotieba.api.get_recovers._classdef\n"
},
{
"path": "docs/ref/classdef/replys.md",
"chars": 38,
"preview": "::: aiotieba.api.get_replys._classdef\n"
},
{
"path": "docs/ref/classdef/searches.md",
"chars": 40,
"preview": "::: aiotieba.api.search_exact._classdef\n"
},
{
"path": "docs/ref/classdef/self_follow_forums.md",
"chars": 50,
"preview": "::: aiotieba.api.get_self_follow_forums._classdef\n"
},
{
"path": "docs/ref/classdef/square_forums.md",
"chars": 45,
"preview": "::: aiotieba.api.get_square_forums._classdef\n"
},
{
"path": "docs/ref/classdef/statistics.md",
"chars": 42,
"preview": "::: aiotieba.api.get_statistics._classdef\n"
},
{
"path": "docs/ref/classdef/threads.md",
"chars": 39,
"preview": "::: aiotieba.api.get_threads._classdef\n"
},
{
"path": "docs/ref/classdef/unblock_appeals.md",
"chars": 47,
"preview": "::: aiotieba.api.get_unblock_appeals._classdef\n"
},
{
"path": "docs/ref/classdef/user_contents.md",
"chars": 45,
"preview": "::: aiotieba.api.get_user_contents._classdef\n"
},
{
"path": "docs/ref/classdef/user_info.md",
"chars": 243,
"preview": "::: aiotieba.api.tieba_uid2user_info._classdef\n::: aiotieba.api.get_uinfo_getuserinfo_app._classdef\n::: aiotieba.api.get"
},
{
"path": "docs/ref/client.md",
"chars": 228,
"preview": "# 客户端\n\n## 如何使用\n\n`aiotieba.Client`是aiotieba的核心入口点 (Entry Point),其中封装了大量操作百度贴吧核心API的简便方法,你可以把它理解成一个“客户端”\n\n我们推荐通过异步上下文管理器来使"
},
{
"path": "docs/ref/config.md",
"chars": 28,
"preview": "# 超时配置\n\n::: aiotieba.config\n"
},
{
"path": "docs/ref/enums.md",
"chars": 25,
"preview": "# 枚举\n\n::: aiotieba.enums\n"
},
{
"path": "docs/ref/exception.md",
"chars": 31,
"preview": "# 异常处理\n\n::: aiotieba.exception\n"
},
{
"path": "docs/tutorial/async_start.md",
"chars": 4194,
"preview": "# 异步编程入门教程\n\n## 样例代码\n\n本样例将获取并打印吧主题帖列表\n\n```python\nimport asyncio\n\nimport aiotieba as tb\n\n\n# [2] 异步函数——`async`关键字\nasync def"
},
{
"path": "docs/tutorial/many_utils.md",
"chars": 4116,
"preview": "# 实用工具\n\n## 签到\n\n```python\nfrom __future__ import annotations\n\nimport asyncio\n\nimport aiotieba as tb\n\n\nasync def sign(BDUS"
},
{
"path": "docs/tutorial/start.md",
"chars": 13530,
"preview": "# 入门教程\n\n阅读本教程,你至少需要对Python的 **上下文管理器** `with...as...` 和 **迭代器** `for...in...` 有基本的印象,因为本文不会对这些重要的基本概念做过于深入的解释\n\n推荐在本地新建一个"
},
{
"path": "mkdocs.yml",
"chars": 2929,
"preview": "site_name: aiotieba\nsite_description: aiotieba开发文档\nsite_url: https://aiotieba.cc/\n\ntheme:\n name: material\n palette:\n "
},
{
"path": "pyproject.toml",
"chars": 3146,
"preview": "[project]\nname = \"aiotieba\"\nversion = \"4.7.0\"\ndescription = \"Asynchronous I/O Client for Baidu Tieba\"\nauthors = [{ name "
},
{
"path": "scripts/proto_compile.py",
"chars": 2021,
"preview": "from __future__ import annotations\n\nimport subprocess\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nif TYPE"
},
{
"path": "src/aiotieba/__init__.py",
"chars": 427,
"preview": "\"\"\"\nAsynchronous I/O Client/Reviewer for Baidu Tieba\n\n@Author: starry.qvq@gmail.com\n@License: Unlicense\n@Documentation: "
},
{
"path": "src/aiotieba/__version__.py",
"chars": 20,
"preview": "__version__ = \"TBD\"\n"
},
{
"path": "src/aiotieba/api/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/aiotieba/api/_classdef/__init__.py",
"chars": 443,
"preview": "from ...core import Account\nfrom .common import TypeMessage\nfrom .container import Containers\nfrom .contents import (\n "
},
{
"path": "src/aiotieba/api/_classdef/common.py",
"chars": 125,
"preview": "from typing import TypeVar\n\nfrom google.protobuf.message import Message\n\nTypeMessage = TypeVar(\"TypeMessage\", bound=Mess"
},
{
"path": "src/aiotieba/api/_classdef/container.py",
"chars": 1063,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom typing import TYPE_CHECKING, Generic, SupportsIndex, "
},
{
"path": "src/aiotieba/api/_classdef/contents.py",
"chars": 6774,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nimport re\nfrom functools import cached_property\nfrom typin"
},
{
"path": "src/aiotieba/api/_classdef/user.py",
"chars": 2639,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\n\nfrom ...enums import Gender, PrivLike, PrivReply\n\n\n@dcs.d"
},
{
"path": "src/aiotieba/api/_classdef/vote.py",
"chars": 1423,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n fr"
},
{
"path": "src/aiotieba/api/_protobuf/Agree.proto",
"chars": 109,
"preview": "// tbclient.Agree\nsyntax = \"proto3\";\n\nmessage Agree {\n int64 agree_num = 1;\n int64 disagree_num = 4;\n}\n"
},
{
"path": "src/aiotieba/api/_protobuf/Agree_pb2.py",
"chars": 849,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/CommonReq.proto",
"chars": 1214,
"preview": "// tbclient.CommonReq\nsyntax = \"proto3\";\n\nmessage CommonReq {\n int32 _client_type = 1;\n string _client_version = 2"
},
{
"path": "src/aiotieba/api/_protobuf/CommonReq_pb2.py",
"chars": 2461,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/Error.proto",
"chars": 102,
"preview": "// tbclient.Error\nsyntax = \"proto3\";\n\nmessage Error {\n int32 errorno = 1;\n string errmsg = 2;\n}\n"
},
{
"path": "src/aiotieba/api/_protobuf/Error_pb2.py",
"chars": 841,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/ForumList.proto",
"chars": 193,
"preview": "// Not actually exist\nsyntax = \"proto3\";\n\nmessage ForumList {\n int64 forum_id = 1;\n string forum_name = 2;\n int"
},
{
"path": "src/aiotieba/api/_protobuf/ForumList_pb2.py",
"chars": 984,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/FrsTabInfo.proto",
"chars": 113,
"preview": "// tbclient.FrsTabInfo\nsyntax = \"proto3\";\n\nmessage FrsTabInfo {\n int32 tab_id = 1;\n string tab_name = 3;\n}\n"
},
{
"path": "src/aiotieba/api/_protobuf/FrsTabInfo_pb2.py",
"chars": 856,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/Lcm.proto",
"chars": 855,
"preview": "syntax = \"proto3\";\n\nmessage Common {\n string cuid = 1;\n string device = 2;\n string os_version = 3;\n string m"
},
{
"path": "src/aiotieba/api/_protobuf/Lcm_pb2.py",
"chars": 2419,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/Media.proto",
"chars": 256,
"preview": "// tbclient.Media\nsyntax = \"proto3\";\n\nmessage Media {\n int32 type = 1;\n string small_pic = 2;\n string big_pic ="
},
{
"path": "src/aiotieba/api/_protobuf/Media_pb2.py",
"chars": 1058,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/Page.proto",
"chars": 208,
"preview": "// tbclient.Page\nsyntax = \"proto3\";\n\nmessage Page {\n int32 page_size = 1;\n int32 current_page = 3;\n int32 total"
},
{
"path": "src/aiotieba/api/_protobuf/Page_pb2.py",
"chars": 1000,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/PbContent.proto",
"chars": 900,
"preview": "// tbclient.PbContent\nsyntax = \"proto3\";\n\nmessage PbContent {\n uint32 type = 1;\n string text = 2;\n string link "
},
{
"path": "src/aiotieba/api/_protobuf/PbContent_pb2.py",
"chars": 2226,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/PollInfo.proto",
"chars": 279,
"preview": "// tbclient.PollInfo\nsyntax = \"proto3\";\n\nmessage PollInfo {\n int32 is_multi = 2;\n int64 total_num = 3;\n\n messag"
},
{
"path": "src/aiotieba/api/_protobuf/PollInfo_pb2.py",
"chars": 1200,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/Post.proto",
"chars": 900,
"preview": "// tbclient.Post\nsyntax = \"proto3\";\n\nimport \"PbContent.proto\";\nimport \"SubPostList.proto\";\nimport \"User.proto\";\nimport \""
},
{
"path": "src/aiotieba/api/_protobuf/PostInfoList.proto",
"chars": 1219,
"preview": "// tbclient.PostInfoList\nsyntax = \"proto3\";\n\nimport \"Media.proto\";\nimport \"Voice.proto\";\nimport \"PollInfo.proto\";\nimport"
},
{
"path": "src/aiotieba/api/_protobuf/PostInfoList_pb2.py",
"chars": 2917,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/Post_pb2.py",
"chars": 2674,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/Rpc.proto",
"chars": 1000,
"preview": "syntax = \"proto3\";\n\nmessage ChunkInfo {\n int64 stream_id = 1;\n int64 chunk_id = 2;\n}\n\nmessage EventTimestamp {\n "
},
{
"path": "src/aiotieba/api/_protobuf/Rpc_pb2.py",
"chars": 2771,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/SimpleForum.proto",
"chars": 216,
"preview": "// tbclient.SimpleForum\nsyntax = \"proto3\";\n\nmessage SimpleForum {\n int64 id = 1;\n string name = 2;\n string firs"
},
{
"path": "src/aiotieba/api/_protobuf/SimpleForum_pb2.py",
"chars": 1018,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/SubPostList.proto",
"chars": 405,
"preview": "// tbclient.SubPost\nsyntax = \"proto3\";\n\nimport \"PbContent.proto\";\nimport \"User.proto\";\nimport \"Agree.proto\";\n\nmessage Su"
},
{
"path": "src/aiotieba/api/_protobuf/SubPostList_pb2.py",
"chars": 1518,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/ThreadInfo.proto",
"chars": 1447,
"preview": "// tbclient.ThreadInfo\nsyntax = \"proto3\";\n\nimport \"User.proto\";\nimport \"Voice.proto\";\nimport \"PollInfo.proto\";\nimport \"V"
},
{
"path": "src/aiotieba/api/_protobuf/ThreadInfo_pb2.py",
"chars": 3255,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/User.proto",
"chars": 1630,
"preview": "// tbclient.User\nsyntax = \"proto3\";\n\nmessage User {\n int64 id = 2;\n string name = 3;\n string name_show = 4;\n "
},
{
"path": "src/aiotieba/api/_protobuf/User_pb2.py",
"chars": 3742,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/VideoInfo.proto",
"chars": 235,
"preview": "// tbclient.VideoInfo\nsyntax = \"proto3\";\n\nmessage VideoInfo {\n string video_url = 2;\n uint32 video_duration = 3;\n "
},
{
"path": "src/aiotieba/api/_protobuf/VideoInfo_pb2.py",
"chars": 1026,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/Voice.proto",
"chars": 109,
"preview": "// tbclient.Voice\nsyntax = \"proto3\";\n\nmessage Voice {\n int32 during_time = 2;\n string voice_md5 = 3;\n}\n"
},
{
"path": "src/aiotieba/api/_protobuf/Voice_pb2.py",
"chars": 837,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/_protobuf/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "src/aiotieba/api/add_bawu/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/add_bawu/_api.py",
"chars": 897,
"preview": "import yarl\n\nfrom ...const import WEB_BASE_HOST\nfrom ...core import HttpCore\nfrom ...enums import BawuType\nfrom ...excep"
},
{
"path": "src/aiotieba/api/add_bawu_blacklist/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/add_bawu_blacklist/_api.py",
"chars": 833,
"preview": "import yarl\n\nfrom ...const import WEB_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import BoolResponse, Tieb"
},
{
"path": "src/aiotieba/api/add_blacklist_old/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/add_blacklist_old/_api.py",
"chars": 877,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import BoolResponse, Tieb"
},
{
"path": "src/aiotieba/api/add_post/__init__.py",
"chars": 72,
"preview": "from ._api import CMD, pack_proto, parse_body, request_http, request_ws\n"
},
{
"path": "src/aiotieba/api/add_post/_api.py",
"chars": 4675,
"preview": "import datetime\nimport time\n\nimport yarl\n\nfrom ...__version__ import __version__\nfrom ...const import APP_BASE_HOST\nfrom"
},
{
"path": "src/aiotieba/api/add_post/protobuf/AddPostReqIdl.proto",
"chars": 866,
"preview": "// tbclient.AddPost.AddPostReqIdl\nsyntax = \"proto3\";\n\nimport \"CommonReq.proto\";\n\nmessage AddPostReqIdl {\n message Dat"
},
{
"path": "src/aiotieba/api/add_post/protobuf/AddPostReqIdl_pb2.py",
"chars": 2009,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/add_post/protobuf/AddPostResIdl.proto",
"chars": 393,
"preview": "// tbclient.AddPost.AddPostResIdl\nsyntax = \"proto3\";\n\nimport \"Error.proto\";\n\nmessage AddPostResIdl {\n Error error = 1"
},
{
"path": "src/aiotieba/api/add_post/protobuf/AddPostResIdl_pb2.py",
"chars": 1591,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/agree/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/agree/_api.py",
"chars": 1220,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST, LATEST_VERSION\nfrom ...core import HttpCore\nfrom ...exception import Bo"
},
{
"path": "src/aiotieba/api/block/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/block/_api.py",
"chars": 1084,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import BoolResponse, Tieb"
},
{
"path": "src/aiotieba/api/del_bawu/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/del_bawu/_api.py",
"chars": 889,
"preview": "import yarl\n\nfrom ...const import WEB_BASE_HOST\nfrom ...core import HttpCore\nfrom ...enums import BawuType\nfrom ...excep"
},
{
"path": "src/aiotieba/api/del_bawu_blacklist/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/del_bawu_blacklist/_api.py",
"chars": 835,
"preview": "import yarl\n\nfrom ...const import WEB_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import BoolResponse, Tieb"
},
{
"path": "src/aiotieba/api/del_blacklist_old/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/del_blacklist_old/_api.py",
"chars": 877,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import BoolResponse, Tieb"
},
{
"path": "src/aiotieba/api/del_post/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/del_post/_api.py",
"chars": 863,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import BoolResponse, Tieb"
},
{
"path": "src/aiotieba/api/del_posts/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/del_posts/_api.py",
"chars": 1057,
"preview": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nimport yarl\n\nfrom ...const import APP_BASE_HOST\nfr"
},
{
"path": "src/aiotieba/api/del_thread/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/del_thread/_api.py",
"chars": 887,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import BoolResponse, Tieb"
},
{
"path": "src/aiotieba/api/del_threads/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/del_threads/_api.py",
"chars": 1023,
"preview": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nimport yarl\n\nfrom ...const import APP_BASE_HOST\nfr"
},
{
"path": "src/aiotieba/api/dislike_forum/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/dislike_forum/_api.py",
"chars": 1023,
"preview": "import time\n\nimport yarl\n\nfrom ...const import APP_BASE_HOST, LATEST_VERSION\nfrom ...core import HttpCore\nfrom ...except"
},
{
"path": "src/aiotieba/api/follow_forum/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/follow_forum/_api.py",
"chars": 943,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import BoolResponse, Tieb"
},
{
"path": "src/aiotieba/api/follow_user/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/follow_user/_api.py",
"chars": 815,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import BoolResponse, Tieb"
},
{
"path": "src/aiotieba/api/get_ats/__init__.py",
"chars": 69,
"preview": "from ._api import parse_body, request\nfrom ._classdef import At, Ats\n"
},
{
"path": "src/aiotieba/api/get_ats/_api.py",
"chars": 850,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST, LATEST_VERSION\nfrom ...core import HttpCore\nfrom ...exception import Ti"
},
{
"path": "src/aiotieba/api/get_ats/_classdef.py",
"chars": 4687,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom functools import cached_property\nfrom typing import T"
},
{
"path": "src/aiotieba/api/get_bawu_blacklist/__init__.py",
"chars": 99,
"preview": "from ._api import parse_body, request\nfrom ._classdef import BawuBlacklistUser, BawuBlacklistUsers\n"
},
{
"path": "src/aiotieba/api/get_bawu_blacklist/_api.py",
"chars": 740,
"preview": "import bs4\nimport yarl\n\nfrom ...const import WEB_BASE_HOST\nfrom ...core import HttpCore\nfrom ._classdef import BawuBlack"
},
{
"path": "src/aiotieba/api/get_bawu_blacklist/_classdef.py",
"chars": 3176,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom typing import TYPE_CHECKING\n\nfrom ...exception import"
},
{
"path": "src/aiotieba/api/get_bawu_info/__init__.py",
"chars": 119,
"preview": "from ._api import CMD, pack_proto, parse_body, request_http, request_ws\nfrom ._classdef import BawuInfo, UserInfo_bawu\n"
},
{
"path": "src/aiotieba/api/get_bawu_info/_api.py",
"chars": 1392,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST, LATEST_VERSION\nfrom ...core import HttpCore, WsCore\nfrom ...exception i"
},
{
"path": "src/aiotieba/api/get_bawu_info/_classdef.py",
"chars": 4354,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom functools import cached_property\nfrom typing import T"
},
{
"path": "src/aiotieba/api/get_bawu_info/protobuf/GetBawuInfoReqIdl.proto",
"chars": 223,
"preview": "// tbclient.GetBawuInfo.GetBawuInfoReqIdl\nsyntax = \"proto3\";\n\nimport \"CommonReq.proto\";\n\nmessage GetBawuInfoReqIdl {\n "
},
{
"path": "src/aiotieba/api/get_bawu_info/protobuf/GetBawuInfoReqIdl_pb2.py",
"chars": 1229,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/get_bawu_info/protobuf/GetBawuInfoResIdl.proto",
"chars": 754,
"preview": "// tbclient.GetBawuInfo.GetBawuInfoResIdl\nsyntax = \"proto3\";\n\nimport \"Error.proto\";\n\nmessage GetBawuInfoResIdl {\n mes"
},
{
"path": "src/aiotieba/api/get_bawu_info/protobuf/GetBawuInfoResIdl_pb2.py",
"chars": 2372,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/get_bawu_perm/__init__.py",
"chars": 70,
"preview": "from ._api import parse_body, request\nfrom ._classdef import BawuPerm\n"
},
{
"path": "src/aiotieba/api/get_bawu_perm/_api.py",
"chars": 855,
"preview": "import yarl\n\nfrom ...const import WEB_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import TiebaServerError\nf"
},
{
"path": "src/aiotieba/api/get_bawu_perm/_classdef.py",
"chars": 1133,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom typing import TYPE_CHECKING\n\nfrom ...enums import Baw"
},
{
"path": "src/aiotieba/api/get_bawu_postlogs/__init__.py",
"chars": 79,
"preview": "from ._api import parse_body, request\nfrom ._classdef import Postlog, Postlogs\n"
},
{
"path": "src/aiotieba/api/get_bawu_postlogs/_api.py",
"chars": 1846,
"preview": "from __future__ import annotations\n\nimport time\nfrom typing import TYPE_CHECKING\nfrom urllib.parse import quote\n\nimport "
},
{
"path": "src/aiotieba/api/get_bawu_postlogs/_classdef.py",
"chars": 5443,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom datetime import datetime\nfrom typing import TYPE_CHEC"
},
{
"path": "src/aiotieba/api/get_bawu_userlogs/__init__.py",
"chars": 79,
"preview": "from ._api import parse_body, request\nfrom ._classdef import Userlog, Userlogs\n"
},
{
"path": "src/aiotieba/api/get_bawu_userlogs/_api.py",
"chars": 1846,
"preview": "from __future__ import annotations\n\nimport time\nfrom typing import TYPE_CHECKING\nfrom urllib.parse import quote\n\nimport "
},
{
"path": "src/aiotieba/api/get_bawu_userlogs/_classdef.py",
"chars": 3403,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom datetime import datetime\nfrom typing import TYPE_CHEC"
},
{
"path": "src/aiotieba/api/get_blacklist/__init__.py",
"chars": 91,
"preview": "from ._api import parse_body, request\nfrom ._classdef import BlacklistUser, BlacklistUsers\n"
},
{
"path": "src/aiotieba/api/get_blacklist/_api.py",
"chars": 903,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST, LATEST_VERSION\nfrom ...core import HttpCore\nfrom ...exception import Ti"
},
{
"path": "src/aiotieba/api/get_blacklist/_classdef.py",
"chars": 2679,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom functools import cached_property\nfrom typing import T"
},
{
"path": "src/aiotieba/api/get_blacklist_old/__init__.py",
"chars": 131,
"preview": "from ._api import CMD, pack_proto, parse_body, request_http, request_ws\nfrom ._classdef import BlacklistOldUser, Blackli"
},
{
"path": "src/aiotieba/api/get_blacklist_old/_api.py",
"chars": 1631,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST, LATEST_VERSION\nfrom ...core import Account, HttpCore, WsCore\nfrom ...ex"
},
{
"path": "src/aiotieba/api/get_blacklist_old/_classdef.py",
"chars": 3006,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom functools import cached_property\n\nfrom ...exception i"
},
{
"path": "src/aiotieba/api/get_blacklist_old/protobuf/UserMuteQueryReqIdl.proto",
"chars": 251,
"preview": "// tbclient.UserMuteQuery.UserMuteQueryReqIdl\nsyntax = \"proto3\";\n\nimport \"CommonReq.proto\";\n\nmessage UserMuteQueryReqIdl"
},
{
"path": "src/aiotieba/api/get_blacklist_old/protobuf/UserMuteQueryReqIdl_pb2.py",
"chars": 1268,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/get_blacklist_old/protobuf/UserMuteQueryResIdl.proto",
"chars": 479,
"preview": "// tbclient.UserMuteQuery.UserMuteQueryResIdl\nsyntax = \"proto3\";\n\nimport \"Error.proto\";\nimport \"Page.proto\";\n\nmessage Us"
},
{
"path": "src/aiotieba/api/get_blacklist_old/protobuf/UserMuteQueryResIdl_pb2.py",
"chars": 1759,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/get_blocks/__init__.py",
"chars": 75,
"preview": "from ._api import parse_body, request\nfrom ._classdef import Block, Blocks\n"
},
{
"path": "src/aiotieba/api/get_blocks/_api.py",
"chars": 871,
"preview": "import yarl\n\nfrom ...const import WEB_BASE_HOST\nfrom ...core import HttpCore\nfrom ...exception import TiebaServerError\nf"
},
{
"path": "src/aiotieba/api/get_blocks/_classdef.py",
"chars": 2345,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom typing import TYPE_CHECKING\n\nimport bs4\n\nfrom ...exce"
},
{
"path": "src/aiotieba/api/get_cid/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
},
{
"path": "src/aiotieba/api/get_cid/_api.py",
"chars": 911,
"preview": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nimport yarl\n\nfrom ...const import APP_BASE_HOST\nfr"
},
{
"path": "src/aiotieba/api/get_comments/__init__.py",
"chars": 169,
"preview": "from ._api import CMD, pack_proto, parse_body, request_http, request_ws\nfrom ._classdef import Comment, Comments, Post_c"
},
{
"path": "src/aiotieba/api/get_comments/_api.py",
"chars": 1675,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST, STABLE_VERSION\nfrom ...core import HttpCore, WsCore\nfrom ...exception i"
},
{
"path": "src/aiotieba/api/get_comments/_classdef.py",
"chars": 23364,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom functools import cached_property\n\nfrom ...enums impor"
},
{
"path": "src/aiotieba/api/get_comments/protobuf/PbFloorReqIdl.proto",
"chars": 278,
"preview": "// tbclient.PbFloor.PbFloorReqIdl\nsyntax = \"proto3\";\n\nimport \"CommonReq.proto\";\n\nmessage PbFloorReqIdl {\n message Dat"
},
{
"path": "src/aiotieba/api/get_comments/protobuf/PbFloorReqIdl_pb2.py",
"chars": 1293,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/get_comments/protobuf/PbFloorResIdl.proto",
"chars": 454,
"preview": "// tbclient.PbFloor.PbFloorResIdl\nsyntax = \"proto3\";\n\nimport \"Error.proto\";\nimport \"Page.proto\";\nimport \"Post.proto\";\nim"
},
{
"path": "src/aiotieba/api/get_comments/protobuf/PbFloorResIdl_pb2.py",
"chars": 1808,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/get_dislike_forums/__init__.py",
"chars": 123,
"preview": "from ._api import CMD, pack_proto, parse_body, request_http, request_ws\nfrom ._classdef import DislikeForum, DislikeForu"
},
{
"path": "src/aiotieba/api/get_dislike_forums/_api.py",
"chars": 1614,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST, LATEST_VERSION\nfrom ...core import Account, HttpCore, WsCore\nfrom ...ex"
},
{
"path": "src/aiotieba/api/get_dislike_forums/_classdef.py",
"chars": 2208,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\n\nfrom ...exception import TbErrorExt\nfrom .._classdef impo"
},
{
"path": "src/aiotieba/api/get_dislike_forums/protobuf/GetDislikeListReqIdl.proto",
"chars": 252,
"preview": "// tbclient.GetDislikeList.GetDislikeListReqIdl\nsyntax = \"proto3\";\n\nimport \"CommonReq.proto\";\n\nmessage GetDislikeListReq"
},
{
"path": "src/aiotieba/api/get_dislike_forums/protobuf/GetDislikeListReqIdl_pb2.py",
"chars": 1283,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/get_dislike_forums/protobuf/GetDislikeListResIdl.proto",
"chars": 320,
"preview": "// tbclient.GetDislikeList.GetDislikeListResIdl\nsyntax = \"proto3\";\n\nimport \"Error.proto\";\nimport \"ForumList.proto\";\n\nmes"
},
{
"path": "src/aiotieba/api/get_dislike_forums/protobuf/GetDislikeListResIdl_pb2.py",
"chars": 1426,
"preview": "\"\"\"Generated protocol buffer code.\"\"\"\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import"
},
{
"path": "src/aiotieba/api/get_fans/__init__.py",
"chars": 71,
"preview": "from ._api import parse_body, request\nfrom ._classdef import Fan, Fans\n"
},
{
"path": "src/aiotieba/api/get_fans/_api.py",
"chars": 901,
"preview": "import yarl\n\nfrom ...const import APP_BASE_HOST, LATEST_VERSION\nfrom ...core import HttpCore\nfrom ...exception import Ti"
},
{
"path": "src/aiotieba/api/get_fans/_classdef.py",
"chars": 3219,
"preview": "from __future__ import annotations\n\nimport dataclasses as dcs\nfrom functools import cached_property\nfrom typing import T"
},
{
"path": "src/aiotieba/api/get_fid/__init__.py",
"chars": 38,
"preview": "from ._api import parse_body, request\n"
}
]
// ... and 304 more files (download for full content)
About this extraction
This page contains the full source code of the Starry-OvO/aiotieba GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 504 files (1.1 MB), approximately 334.9k tokens, and a symbol index with 1513 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.