imgur API - lots of credits left but ImgurClientRateLimitError: Rate-limit exceeded
imgur API - lots of credits left but ImgurClientRateLimitError: Rate-limit exceeded
我正在使用 python imgur 客户端进行一些上传,但我得到
ImgurClientRateLimitError: Rate-limit exceeded!
我在一个小时内完成了近 500 个 api 请求,这就是我当前的学分:
{ u'ClientLimit': 12500,
u'ClientRemaining': 12500,
u'UserLimit': 500,
u'UserRemaining': 500,
u'UserReset': 1429698684
}
我已经查看了此处的文档 https://api.imgur.com/#limits 但找不到任何内容来说明为什么我会收到速率限制错误。
有人知道我为什么会收到这个吗?
我的特定上传调用看起来像
x = imgur_client.upload_from_url(url, config=None, anon=True)
--------更新-----
这是 mashape 中统计数据的屏幕截图。我不明白我怎么可能接近极限。
对于遇到这种情况的人,解决方案是确保在 HTTP headers 中发送您的 mashape 密钥。
在我做这个 post 的时候,默认的 imgur python 库不支持它,但现在支持了。
https://github.com/Imgur/imgurpython/blob/master/imgurpython/client.py#L76
我正在使用 python imgur 客户端进行一些上传,但我得到
ImgurClientRateLimitError: Rate-limit exceeded!
我在一个小时内完成了近 500 个 api 请求,这就是我当前的学分:
{ u'ClientLimit': 12500,
u'ClientRemaining': 12500,
u'UserLimit': 500,
u'UserRemaining': 500,
u'UserReset': 1429698684
}
我已经查看了此处的文档 https://api.imgur.com/#limits 但找不到任何内容来说明为什么我会收到速率限制错误。
有人知道我为什么会收到这个吗?
我的特定上传调用看起来像
x = imgur_client.upload_from_url(url, config=None, anon=True)
--------更新-----
这是 mashape 中统计数据的屏幕截图。我不明白我怎么可能接近极限。
对于遇到这种情况的人,解决方案是确保在 HTTP headers 中发送您的 mashape 密钥。
在我做这个 post 的时候,默认的 imgur python 库不支持它,但现在支持了。
https://github.com/Imgur/imgurpython/blob/master/imgurpython/client.py#L76