Skip to content

Commit

Permalink
Merge pull request #262 from lumina37/develop
Browse files Browse the repository at this point in the history
Update 4.5.3
  • Loading branch information
lumina37 authored Feb 26, 2025
2 parents c3dedcb + b38e030 commit 8e93e3d
Show file tree
Hide file tree
Showing 72 changed files with 585 additions and 165 deletions.
1 change: 1 addition & 0 deletions aiotieba/api/_protobuf/ThreadInfo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ message ThreadInfo {
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;
Expand Down
16 changes: 8 additions & 8 deletions aiotieba/api/_protobuf/ThreadInfo_pb2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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\"\xcc\x08\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\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\x12\x30\n\rcustom_figure\x18\xd3\x01 \x01(\x0b\x32\x18.ThreadInfo.CustomFigure\x12.\n\x0c\x63ustom_state\x18\xd4\x01 \x01(\x0b\x32\x17.ThreadInfo.CustomState\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\x1a(\n\x0c\x43ustomFigure\x12\x18\n\x10\x62\x61\x63kground_value\x18\x03 \x01(\t\x1a\x1e\n\x0b\x43ustomState\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\tb\x06proto3"
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\"\xe9\x08\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\x12\x30\n\rcustom_figure\x18\xd3\x01 \x01(\x0b\x32\x18.ThreadInfo.CustomFigure\x12.\n\x0c\x63ustom_state\x18\xd4\x01 \x01(\x0b\x32\x17.ThreadInfo.CustomState\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\x1a(\n\x0c\x43ustomFigure\x12\x18\n\x10\x62\x61\x63kground_value\x18\x03 \x01(\t\x1a\x1e\n\x0b\x43ustomState\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\tb\x06proto3"
)

_globals = globals()
Expand All @@ -26,10 +26,10 @@
if not _descriptor._USE_C_DESCRIPTORS:
DESCRIPTOR._loaded_options = None
_globals["_THREADINFO"]._serialized_start = 122
_globals["_THREADINFO"]._serialized_end = 1222
_globals["_THREADINFO_ORIGINTHREADINFO"]._serialized_start = 919
_globals["_THREADINFO_ORIGINTHREADINFO"]._serialized_end = 1148
_globals["_THREADINFO_CUSTOMFIGURE"]._serialized_start = 1150
_globals["_THREADINFO_CUSTOMFIGURE"]._serialized_end = 1190
_globals["_THREADINFO_CUSTOMSTATE"]._serialized_start = 1192
_globals["_THREADINFO_CUSTOMSTATE"]._serialized_end = 1222
_globals["_THREADINFO"]._serialized_end = 1251
_globals["_THREADINFO_ORIGINTHREADINFO"]._serialized_start = 948
_globals["_THREADINFO_ORIGINTHREADINFO"]._serialized_end = 1177
_globals["_THREADINFO_CUSTOMFIGURE"]._serialized_start = 1179
_globals["_THREADINFO_CUSTOMFIGURE"]._serialized_end = 1219
_globals["_THREADINFO_CUSTOMSTATE"]._serialized_start = 1221
_globals["_THREADINFO_CUSTOMSTATE"]._serialized_end = 1251
4 changes: 2 additions & 2 deletions aiotieba/api/add_blacklist_old/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
Expand All @@ -21,7 +21,7 @@ async def request(http_core: HttpCore, user_id: int) -> BoolResponse:
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/user/userMuteAdd"), data
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)
Expand Down
6 changes: 3 additions & 3 deletions aiotieba/api/add_post/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import yarl

from ...__version__ import __version__
from ...const import APP_BASE_HOST, APP_SECURE_SCHEME, POST_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
Expand All @@ -26,7 +26,7 @@ def pack_proto(account: Account, fname: str, fid: int, tid: int, show_name: str,
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 = POST_VERSION
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"
Expand Down Expand Up @@ -102,7 +102,7 @@ async def request_http(
data = pack_proto(http_core.account, fname, fid, tid, show_name, content)

request = http_core.pack_proto_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/post/add", query_string=f"cmd={CMD}"),
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/post/add", query_string=f"cmd={CMD}"),
data,
)

Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/agree/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME, MAIN_VERSION
from ...const import APP_BASE_HOST, MAIN_VERSION
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
Expand Down Expand Up @@ -33,7 +33,7 @@ async def request(
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/agree/opAgree"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/block/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
Expand Down Expand Up @@ -29,7 +29,7 @@ async def request(http_core: HttpCore, fid: int, portrait: str, day: int, reason
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/bawu/commitprison"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/del_blacklist_old/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
Expand All @@ -21,7 +21,7 @@ async def request(http_core: HttpCore, user_id: int) -> BoolResponse:
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/user/userMuteDel"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/del_post/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
Expand All @@ -22,7 +22,7 @@ async def request(http_core: HttpCore, fid: int, tid: int, pid: int) -> BoolResp
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/bawu/delpost"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/del_posts/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json

Expand All @@ -29,7 +29,7 @@ async def request(http_core: HttpCore, fid: int, tid: int, pids: list[int], bloc
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/bawu/multiDelPost"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/del_thread/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
Expand All @@ -22,7 +22,7 @@ async def request(http_core: HttpCore, fid: int, tid: int, is_hide: bool) -> Boo
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/bawu/delthread"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/del_threads/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json

Expand All @@ -28,7 +28,7 @@ async def request(http_core: HttpCore, fid: int, tids: list[int], block: bool) -
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/bawu/multiDelThread"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/dislike_forum/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME, MAIN_VERSION
from ...const import APP_BASE_HOST, MAIN_VERSION
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import pack_json, parse_json
Expand All @@ -26,7 +26,7 @@ async def request(http_core: HttpCore, fid: int) -> BoolResponse:
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/excellent/submitDislike"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/follow_forum/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
Expand All @@ -22,7 +22,7 @@ async def request(http_core: HttpCore, fid: int) -> BoolResponse:
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/forum/like"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/follow_user/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...core import HttpCore
from ...exception import BoolResponse, TiebaServerError
from ...helper import parse_json
Expand All @@ -20,7 +20,7 @@ async def request(http_core: HttpCore, portrait: str) -> BoolResponse:
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/user/follow"), data
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)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/get_ats/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME, MAIN_VERSION
from ...const import APP_BASE_HOST, MAIN_VERSION
from ...core import HttpCore
from ...exception import TiebaServerError
from ...helper import parse_json
Expand All @@ -25,7 +25,7 @@ async def request(http_core: HttpCore, pn: int) -> Ats:
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/u/feed/atme"), data
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)
Expand Down
6 changes: 2 additions & 4 deletions aiotieba/api/get_bawu_info/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_INSECURE_SCHEME, MAIN_VERSION
from ...const import APP_BASE_HOST, MAIN_VERSION
from ...core import HttpCore, WsCore
from ...exception import TiebaServerError
from ._classdef import BawuInfo
Expand Down Expand Up @@ -34,9 +34,7 @@ async def request_http(http_core: HttpCore, fid: int) -> BawuInfo:
data = pack_proto(fid)

request = http_core.pack_proto_request(
yarl.URL.build(
scheme=APP_INSECURE_SCHEME, host=APP_BASE_HOST, path="/c/f/forum/getBawuInfo", query_string=f"cmd={CMD}"
),
yarl.URL.build(scheme="http", host=APP_BASE_HOST, path="/c/f/forum/getBawuInfo", query_string=f"cmd={CMD}"),
data,
)

Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/get_blacklist/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME, MAIN_VERSION
from ...const import APP_BASE_HOST, MAIN_VERSION
from ...core import HttpCore
from ...exception import TiebaServerError
from ...helper import parse_json
Expand All @@ -24,7 +24,7 @@ async def request(http_core: HttpCore) -> BlacklistUsers:
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/u/user/userBlackPage"), data
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)
Expand Down
6 changes: 2 additions & 4 deletions aiotieba/api/get_blacklist_old/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME, MAIN_VERSION
from ...const import APP_BASE_HOST, MAIN_VERSION
from ...core import Account, HttpCore, WsCore
from ...exception import TiebaServerError
from ._classdef import BlacklistOldUsers
Expand Down Expand Up @@ -36,9 +36,7 @@ async def request_http(http_core: HttpCore, pn: int, rn: int) -> BlacklistOldUse
data = pack_proto(http_core.account, pn, rn)

request = http_core.pack_proto_request(
yarl.URL.build(
scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/u/user/userMuteQuery", query_string=f"cmd={CMD}"
),
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/u/user/userMuteQuery", query_string=f"cmd={CMD}"),
data,
)

Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/get_cid/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME
from ...const import APP_BASE_HOST
from ...exception import TiebaServerError
from ...helper import parse_json

Expand All @@ -29,7 +29,7 @@ async def request(http_core: HttpCore, fname: str) -> list[dict[str, str | int]]
]

request = http_core.pack_form_request(
yarl.URL.build(scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/c/bawu/goodlist"), data
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/c/bawu/goodlist"), data
)

body = await http_core.net_core.send_request(request, read_bufsize=1024)
Expand Down
4 changes: 2 additions & 2 deletions aiotieba/api/get_comments/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_INSECURE_SCHEME, MAIN_VERSION
from ...const import APP_BASE_HOST, MAIN_VERSION
from ...core import HttpCore, WsCore
from ...exception import TiebaServerError
from ._classdef import Comments
Expand Down Expand Up @@ -40,7 +40,7 @@ async def request_http(http_core: HttpCore, tid: int, pid: int, pn: int, is_comm
data = pack_proto(tid, pid, pn, is_comment)

request = http_core.pack_proto_request(
yarl.URL.build(scheme=APP_INSECURE_SCHEME, host=APP_BASE_HOST, path="/c/f/pb/floor", query_string=f"cmd={CMD}"),
yarl.URL.build(scheme="http", host=APP_BASE_HOST, path="/c/f/pb/floor", query_string=f"cmd={CMD}"),
data,
)

Expand Down
6 changes: 2 additions & 4 deletions aiotieba/api/get_dislike_forums/_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yarl

from ...const import APP_BASE_HOST, APP_SECURE_SCHEME, MAIN_VERSION
from ...const import APP_BASE_HOST, MAIN_VERSION
from ...core import Account, HttpCore, WsCore
from ...exception import TiebaServerError
from ._classdef import DislikeForums
Expand Down Expand Up @@ -36,9 +36,7 @@ async def request_http(http_core: HttpCore, pn: int, rn: int) -> DislikeForums:
data = pack_proto(http_core.account, pn, rn)

request = http_core.pack_proto_request(
yarl.URL.build(
scheme=APP_SECURE_SCHEME, host=APP_BASE_HOST, path="/c/u/user/getDislikeList", query_string=f"cmd={CMD}"
),
yarl.URL.build(scheme="https", host=APP_BASE_HOST, path="/c/u/user/getDislikeList", query_string=f"cmd={CMD}"),
data,
)

Expand Down
Loading

0 comments on commit 8e93e3d

Please sign in to comment.