The Movie Database 支持

Hey,

I was making 10 requests in 14 seconds as follows but only 2 of them were successful. Please let me know how to fix it. In addition, those X-RateLimit headers make little sense to me.

no. timestamp            status             count(*)    Limit    Remaining    Reset
1.  2015-11-19 11:40:03 HTTP/1.1 429        62
2.  2015-11-19 11:40:05 HTTP/1.1 429        79
3.  2015-11-19 11:40:06 HTTP/1.1 429        98
4.  2015-11-19 11:40:08 HTTP/1.1 429        114
5.  2015-11-19 11:40:09 HTTP/1.1 200 OK                 40        30        1447905064
6.  2015-11-19 11:40:10 HTTP/1.1 200 OK                 40        9         1447905064
7.  2015-11-19 11:40:12 HTTP/1.1 429        58
8.  2015-11-19 11:40:13 HTTP/1.1 429        69
9.  2015-11-19 11:40:15 HTTP/1.1 429        87
10. 2015-11-19 11:40:17 HTTP/1.1 429        105

(*) The number appeared in the error message: "Your request count (##) is over the allowed limit of 40."

Here is my test script: for i in {1..10}; do num=$(printf "%02d" ${i}); curl -D "header${num}.txt" "http://api.themoviedb.org/3/search/tv?api_key=****************************&query=house%20of%20cards&page=1&language=en" > "result${num}.txt"; sleep 1; done

BTW, I am located in Asia. Would a foreign IP do any difference?

3 回复(第 1 页,共 1 页)

Jump to last post

Hi clauslin,

Is your IP shared in any way? You can see your limit going down in between requests (from 30 remaining to 9, so in between there was 21 requests made) so something is making additional calls with your IP.

Hi Travis,

Yes, the IP is shared. I was doing that at my office.

Then, I ran the script at my home and this time 'X-RateLimit-Remaining' decreased as documented. Thanks for your help!

No problem!

找不到电影或节目?登录并创建它吧。

全站通用

s 聚焦到搜索栏
p 打开个人资料菜单
esc 关闭打开的窗口
? 打开键盘快捷键窗口

在媒体页面

b 返回(或返回上级)
e 进入编辑页面

在电视季页面

(右箭头)下一季
(左箭头)前一季

在电视集页面

(右箭头)下一集
(左箭头)上一集

在所有图像页面

a 打开添加图片窗口

在所有编辑页面

t 打开翻译选择器
ctrl+ s 提交

在讨论页面

n 创建新讨论
w 切换关注状态
p 设为公开 / 私密讨论
c 关闭 / 开放讨论
a 打开活动页
r 回复讨论
l 跳转至最新回复
ctrl+ enter 发送信息
(右箭头)下一页
(左箭头)前一页

设置

想给这个条目评分或将其添加到片单中?

登录

还不是会员?

注册加入社区