Aiotieba

Latest version: v4.4.5

Safety actively analyzes 640986 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 15 of 19

2.1.0

贴吧接口层

新增特性
- 新增三种 `PbContent` 的解析支持: [大表情type=11](http://tieba.baidu.com/p/5047676428) [表情包type=20](http://tieba.baidu.com/p/5470214675) [展览模块type=37](http://tieba.baidu.com/p/7760184147)

变化特性
- 文件名变更: `data_structure.py` -> `_types.py` / `api.py` -> `_api.py` / `config.py` -> `_config.py` / `logger.py` -> `_logger.py`
- `Browser` 类成员函数名变更: `get_userinfo` -> `get_user_info` / `get_userinfo_weak` -> `get_basic_user_info`
- `Browser` 类成员函数功能变化: 原函数 `del_thread` 被替换为 `hide_thread` `del_thread` / 原函数 `recover` 被替换为 `unhide_thread` `recover_thread` `recover_post` 以获得更直观的语义解释
- 添加/修正多处类型提示
- 使用 `Google` 格式规范重新编写注释
- 抽象类 `AsyncIterator` `Coroutine` `Iterator` `Iterable` `Callable` 的定义来源由 `typing` 替换为 `collections.abc` 以适应 `Python3.10` 的变化
- `aiohttp.TCPConnector` 参数 `ttl_dns_cache` 由默认的10秒调整为600秒以获得更佳的dns缓存性能

Bug修复

- 修复 `Browser.get_homepage` 和 `Browser.get_recom_list` 无法正确获取 `user.priv_like` 的问题

功能接口层

变化特性
- 修改了贴吧接口层中发生变化的函数名

2.0.3

贴吧接口层

新增特性
- 对应于 `PbContent` 的内容碎片类 `_Fragment` 新增两个子类 `FragAt` `FragTiebaPlus` 以支持对内容和TiebaPlus内容的解析。 内容碎片列表 `Fragments` 新增类成员 `ats` `tiebapluses` 以表示内容和TiebaPlus内容的列表

变化特性
- 调整多处日志记录级别,大部分是 `error` 调整为 `warning` ,因为它们不再会引发能终止程序的错误
- 优化 `protobuf` 发包流程:支持自定义 `boundary` 。删除 `part headers` 中的字段 `CONTENT_TYPE` 和 `CONTENT_LENGTH` 以获得少许传输性能提升。当然这一处理并不优雅,期待 `aiohttp` 后续对 `MultipartWriter` 的更新
- 使用 `aiohttp.hdrs` 为 `headers` 提供标准定义,删除一些不必要的字段
- 限制网页 `cookies` 的可用域
- `Sessions` 新增类成员 `_timeout` `_connection`
- `Sessions.app` `Sessions.app_proto` `Sessions.web` 的 `connector_owner` 参数设为 `False` 以避免意外的连接池关闭
- `Sessions._timeout` 的参数 `connect` 设为5秒以缩短等待重用连接的超时时间
- `Sessions._connector` 的参数 `keepalive_timeout` 调整为90秒

功能接口层

Bug修复
- 修复 `MySQL.init_database()` 的调用异常,现在该函数会调用 `create_table_tid_water()` 而不是 `create_table_tid_tmpunhide()` (PR 1 by Aimersa )

2.0.2

贴吧接口层

新增特性
- 新增接口 `Browser.get_bawu_dict()` 用于获取吧务信息,使用客户端接口 `c/f/forum/getBawuInfo` 实现。新增用于支持该接口的 `GetBawuInfoReqIdl.proto` `GetBawuInfoResIdl.proto` 。功能类似的原接口 `Browser.get_admin_list()` 被同步弃用

功能接口层

变化特性
- 现在不再需要 `import tiebaBrowser.cloud_review` 来解锁云审查功能,可以直接 `import tiebaBrowser`

2.0.1rc1

贴吧接口层

新增特性
- `Browser.get_tbs()` 改用客户端接口 `/c/s/login` 获取 `tbs`
- `Thread` 支持对转发/投票/转发嵌套投票主题帖的解析
- `UserInfo` 新字段:是否vip `is_vip` 是否贴吧大神 `is_god`

变化特性
- 网络库由同步的 [`requests`](https://github.com/psf/requests)变更为异步的 [`aiohttp`](https://github.com/aio-libs/aiohttp)。`api.py` 被大幅重构,项目运行逻辑也由同步转变为异步,因此大版本号+1

Bug修复
- 修复 `Browser._user_name2userinfo_weak` 的 `json` 解析异常,现在 `GBK` 解码字符串时会忽略错误

功能接口层

变化特性
- `mysql.py` 中数据库 `tid_tmphide` 更名为 `tid_water` 并新增字段 `is_hide` 以配合 `admin_listen.py` 中的新指令功能
- `tbBrowser.__init__.py` 中 `SIGTERM` 信号对应动作由抛出 `SystemExit` 异常变为抛出 `KeyboardInterrupt` 异常

应用层

变化特性
- `admin_listen.py` 中原有指令 `tmphide` `tmpunhide` 的功能已被新指令 `water` `unwater` `water_restrict` 替代。参考[指令管理器使用说明书](https://github.com/Starry-OvO/Tieba-Manager/wiki/%E6%8C%87%E4%BB%A4%E7%AE%A1%E7%90%86%E5%99%A8%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E%E4%B9%A6#water-%E6%A0%87%E8%AE%B0%E6%97%A0%E5%85%B3%E6%B0%B4)

Bug提示
- 转向异步后 `spider.py` 和 `vote.py` 尚未经过可用性测试

1.0.0

最后一个使用同步网络IO(requests)的稳定版本

0.6.1

变化特性

- 移除对`cryptography`的直接依赖

Page 15 of 19

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.