Search Twitter api-搜索太复杂?
知道Twitter为什么会抛出这个错误吗Search Twitter api-搜索太复杂?,search,twitter,Search,Twitter,知道Twitter为什么会抛出这个错误吗 GET https://search.twitter.com/search.json?q=Middle%20Tennessee%20State%20Blue%20Raiders%20Florida%20International%20Golden%20Panthers%20win%20OR%20lose%20-rt%20-from%3Aespn&&lang=en&since=2011-02-09: 403: Sorry, your
GET https://search.twitter.com/search.json?q=Middle%20Tennessee%20State%20Blue%20Raiders%20Florida%20International%20Golden%20Panthers%20win%20OR%20lose%20-rt%20-from%3Aespn&&lang=en&since=2011-02-09: 403: Sorry, your query is too complex. Please reduce complexity and try again.
读这本书。“查询限制为140个URL编码字符。”您的查询字符串为156个字符。至少截至2011年8月,最大查询字符串长度似乎相当高。它对我来说效果很好,最大长度为300;当我移动到500个字符时,我得到了三个查询,其中第二个查询失败:
- q1:OK:491个字符,23个或多个子句
- 问题2:失败:493个字符,39个或子句
- 问题3:确定:203个字符,17个或多个子句
或子句(注意50或子句包含49或,因为例如word1或word2
包含两个子句和一个或
)李>
推特搜索限制为500个字符
我对OR条款的测试是:
- 此搜索有效:
h1或h2或h3或h4或h5或h6或h7或h8或h9或h10或h11或h12或h13或h14或h15或h16或h17或h18或h19或h20或h21或h22或h23或h25或h26或h27或h28或h30或h31或h32或h34或h35或h36或h37或h39或h40或h41或h42或h43或h44或h46或h47或h48或h49或h50
- 但是,如果我们添加:
或h51
,它将失败
我对字符数的测试是:
- 此搜索有效(500个字符):
hell1或hell2或hell3或hell4或hell5或hell6或hell7或hell8或hell9或hell10或hell11或hell12或hell13或hell14或hell15或hell16或hell17或hell18或hell19或hell20或hell21或hell22或hell23或hell24或hell25或hell26或hell27或hell28或hell29或hell30或hell32或hell33或hell35或hell36或hell37或hell38或hell39或hell40或hell41或hell42或hell43或hell44或hell45或hell46或hell47或hell48或hell49或hell50abcdefghijklm
- 但是,如果我们将n(501个字符)添加到最后一个单词(
hell50abcdefghijklmn
),它将失败
请注意,我刚刚意识到,如果我们将字符o
删除到单词hello
,结果是hell
(世界正在给我发送消息吗?xD),文档URL现在已断开。你有一个更新的URL提到搜索最大复杂度准则吗?@Darren Cook:我不确定还有没有。