Skip to content

Commit

Permalink
perf: simplify sign_forums
Browse files Browse the repository at this point in the history
  • Loading branch information
lumina37 committed Jan 9, 2025
1 parent ca39b70 commit d6d429b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions aiotieba/api/sign_forums/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ def parse_body(body: bytes) -> None:


async def request(http_core: HttpCore) -> BoolResponse:
data = [
('_client_version', MAIN_VERSION),
('subapp_type', 'hybrid'),
]
data = [('subapp_type', 'hybrid')]

request = http_core.pack_web_form_request(
yarl.URL.build(scheme="https", host=WEB_BASE_HOST, path="/c/c/forum/msign"),
Expand Down
5 changes: 3 additions & 2 deletions aiotieba/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2343,9 +2343,10 @@ async def sign_forums(self) -> BoolResponse:
Returns:
BoolResponse: True成功 False失败
"""
await self.__init_tbs()
Note:
非SVIP可签到50个吧,SVIP1~5分别可签200~400个吧
"""

return await sign_forums.request(self._http_core)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "aiotieba"
version = "4.5.1a1"
version = "4.5.1a2"
description = "Asynchronous I/O Client for Baidu Tieba"
authors = [{ name = "lumina37", email = "[email protected]" }]
urls = { Repository = "https://github.com/lumina37/aiotieba/", Documentation = "https://aiotieba.cc/" }
Expand Down

0 comments on commit d6d429b

Please sign in to comment.