简介
aiotieba使用asyncio和aiohttp封装了大量操作百度贴吧核心API的简便方法,并为吧务管理设计了一套内容审查脚手架
本框架以提高二次开发速度为首要设计目标。规范且符合直觉的命名规律、全覆盖的类型注解和方法注释让你体验飞一般的开发体验
贴吧接口列表
- 按回复时间/发布时间/热门序获取贴吧主题帖/精华帖列表。支持获取带转发/投票/转发嵌套投票/各种卡片的主题帖信息
- 获取带图片链接/小尾巴内容/点赞情况/用户信息(用户名/portrait/user_id/等级/性别/是否锁回复)/每条回复的前排楼中楼(支持按或不按点赞数排序)的楼层列表
- 获取带所有前述用户信息的楼中楼列表
- 根据用户名/portrait/user_id中的任一项反查其他用户信息,或通过用户主页的tieba_uid反查其他用户信息
- 使用小吧主、语音小编的账号删帖/屏蔽/封禁。支持删除视频帖/批量删帖/多于1天的封禁
- 使用已被大吧主分配解封/恢复/处理申诉权限的吧务账号解封/恢复/处理申诉
- 使用大吧主账号推荐帖子到首页/移动帖子到指定分区/加精/撤精/置顶/撤置顶/添加黑名单/查看黑名单/取消黑名单
- 获取其他用户的主页信息/关注贴吧列表/关注用户列表/粉丝列表/发布的主题帖列表
- 使用当前账号关注贴吧/取关贴吧/关注用户/取关用户/移除粉丝/获取屏蔽贴吧列表/屏蔽贴吧/取消屏蔽贴吧/点赞点踩/取消点赞点踩/签到/水帖/发送私信/获取回复历史
- 获取一个贴吧的最新关注用户列表/等级排行榜/吧务列表/吧详情
额外的审查功能列表
- 数据库功能:缓存贴吧常量(如贴吧名到fid的映射关系、用户基本信息等)/为用户添加标记/为帖子或回复添加标记/为图像hash添加标记
- 图像处理功能:图像解码/二维码解析/图像hash计算
安装并使用
-
检查Python版本 (>=3.9)
-
安装
pip install aiotieba[img]
- 体验一下
import asyncio
import aiotieba
async def main():
async with aiotieba.Client() as client:
print(await client.get_threads("天堂鸡汤"))
asyncio.run(main())
- 继续阅读入门教程
友情链接
客户名单
2022.11.20更新
| 吧名 | 关注用户数 | 最近29天日均访问量 | 日均主题帖数 | 日均回复数 |
|---|---|---|---|---|
| 抗压背锅 | 4,297,600 | 1,346,462 | 3,602 | 87,919 |
| 孙笑川 | 2,867,558 | 571,445 | 5,317 | 151,279 |
| lol半价 | 1,976,938 | 102,687 | 342 | 5,162 |
| 宫漫 | 1,385,076 | 33,628 | 159 | 1,768 |
| 逆水寒ol | 719,939 | 27,041 | 103 | 1,915 |
| 新孙笑川 | 470,700 | 53,570 | 650 | 15,080 |
| vtuber | 218,818 | 10,819 | 57 | 686 |
| asoul | 156,629 | 11,946 | 102 | 506 |
| 嘉然 | 58,623 | 14,485 | 125 | 1,561 |
| 向晚 | 30,468 | 11,727 | 98 | 1,235 |
| 贝拉 | 21,735 | 8,458 | 38 | 565 |
| 乃琳 | 17,262 | 6,120 | 36 | 546 |
| vtuber自由讨论 | 17,023 | 4,058 | 2 | 50 |
| asoul一个魂儿 | 14,281 | 878 | 4 | 15 |
Metadata
Release files for aiotieba 2.9.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiotieba-2.9.6.tar.gz | 65.6 kB | Without provenance | Details for aiotieba-2.9.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiotieba-2.9.6-py3-none-any.whl | Python 3 | none | any | Details for aiotieba-2.9.6-py3-none-any.whl |
Total release size: 157.1 kB
Release files / aiotieba-2.9.6.tar.gz
| Download URL | aiotieba-2.9.6.tar.gz |
|---|---|
| Size | 65.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b68b3a3a574e6642e50c52c93d2a5f588a32481d7405a0c1142d659036d3cb1
|
|
BLAKE2b-256 checksum How to use checksums |
ca8967b17b3d7536e5a5534cc46b9866a1e9929095cf34ed6e945b169b7afc2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.8
|
Release files / aiotieba-2.9.6-py3-none-any.whl
| Download URL | aiotieba-2.9.6-py3-none-any.whl |
|---|---|
| Size | 91.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92ec3d896630387dd1ee725c0bd106db79c1418e7b846b6c3e901dfe57f1bcb4
|
|
BLAKE2b-256 checksum How to use checksums |
19c20a49dd1c5f856275dcc2436e0dd77fc1c25aeb5cb60e7e6fef2874427389
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.8
|
Security for aiotieba 2.9.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.