Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 新增同步请求, 替换部分httpx代码处 #615

Merged
merged 5 commits into from
Dec 30, 2023

Conversation

iconFehu
Copy link
Contributor

@iconFehu iconFehu commented Dec 29, 2023

新增同步请求

    1. 新增同步请求
    1. 修复二维码登录异常
    1. 修改get_api可传入多个参数取值

@iconFehu
Copy link
Contributor Author

iconFehu commented Dec 29, 2023

改了多处代码,相关维护者请帮忙测试下。目前自行测试二维码登录正常。

  1. network.py中声明了http_client_type全局变量,用于切换http客户端类型,可选择httpx.AsyncClient或aiohttp.ClientSession
  2. 修改了get_api,可以通过api = get_api("video", "info", "cid_info")方式来获取接口信息
  3. 新增了部分请求方法的同步版本,如name2uid_sync方法等
  4. 修改了class API,对request方法进行了改动
  5. 新增retry_sync装饰器

删去多余的部分
@z0z0r4
Copy link
Collaborator

z0z0r4 commented Dec 30, 2023

期待.jpg 那我这边昨晚写的就 discard 了

@z0z0r4 z0z0r4 merged commit 65c0d79 into Nemo2011:dev Dec 30, 2023
@z0z0r4 z0z0r4 mentioned this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants