Mikubill / pixivpy-async

Pure Python 3 Async Pixiv API
The Unlicense
149 stars 18 forks source link

请求添加请求时检查access_token有效性的功能 #34

Open ACBAD opened 6 months ago

ACBAD commented 6 months ago

如题,有时请求时会产生以下错误 {'user_message': '', 'message': 'Error occurred at the OAuth process. Please check your Access Token to fix this. Error Message: invalid_grant', 'reason': '', 'user_message_details': {}}

能否在调用时就检查返回结果是否属于access_token无效并更新access_token后再次请求?