Closed xiaozhu2007 closed 9 months ago
目前已知 github.com/{用户名}.png 为用户的头像(记得处理 302 跳转),这样做可以减少一次对 Github API 的请求,避免生产中大量使用导致 Token 达到速率限制而无法提供服务
参见这几行代码:
https://github.com/wling-art/U1bot/blob/a37473ebe2ed063b000851d3882cdfba5f46f34a/src/plugins/nonebot_plugin_githubcard/data_source.py#L27-L31
For example: https://github.com/xiaozhu2007.png会 302 跳转到https://avatars.githubusercontent.com/u/63779340?v=4
https://github.com/xiaozhu2007.png
https://avatars.githubusercontent.com/u/63779340?v=4
呃,我认为不需要,此功能较为少用,再说可以不填token会返回none执行另一个header
如果还有问题再open吧
目前已知 github.com/{用户名}.png 为用户的头像(记得处理 302 跳转),这样做可以减少一次对 Github API 的请求,避免生产中大量使用导致 Token 达到速率限制而无法提供服务
参见这几行代码:
https://github.com/wling-art/U1bot/blob/a37473ebe2ed063b000851d3882cdfba5f46f34a/src/plugins/nonebot_plugin_githubcard/data_source.py#L27-L31
For example:
https://github.com/xiaozhu2007.png
会 302 跳转到https://avatars.githubusercontent.com/u/63779340?v=4