Skip to content

ylw1997/wereadapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wereadapi

微信读书 API 文档和测试仓库。

这个仓库整理当前使用的微信读书接口,包含:

  • docs/apis/*.md: 每个 API 一份 Markdown 文档
  • tests/weread_api_test.py: Python 测试客户端
  • .github/workflows/check.yml: 基础语法校验
  • .env.example: 环境变量示例

当前支持接口

凭据

不要把 Cookie 写进仓库。测试脚本从环境变量读取:

$env:WEREAD_COOKIE="你的微信读书 Cookie"

安装

cd APIS/wereadapi
python -m pip install -r requirements.txt

测试

python tests/weread_api_test.py login-getuid
python tests/weread_api_test.py categories
python tests/weread_api_test.py shelf-sync
python tests/weread_api_test.py book-info --book-id 3300008485

写入类接口默认 dry-run,必须显式加 --execute 才会真实调用:

python tests/weread_api_test.py shelf-add --book-id 3300008485 --execute
python tests/weread_api_test.py review-add --book-id 3300008485 --content "不错" --execute

文档索引

docs/README.md

About

微信读书api

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages