使用 Bing.com 和 Bing Search API 的不同结果
我正在使用 Bing Search API 2.0 (XML) & PHP 检索结果。
但在运行某些查询时,API 不会返回 Bing.com 会返回的(相同)结果。
当我发送此请求时:(这是使用 API)
http://api.search.live.net/xml.aspx?Appid=__________&query=3+ts+site%3Amycharity.ie/charity&sources=web&web.count=10&web.offset=0
我得到 0 个结果。
但是,如果我访问 Bing.com 并搜索 bacon,URL 将是:
http://www.bing.com/search?q=bacon&go=&form=QBRE&filt=all&qs=n&sk=&sc=8-5
因此,如果我将 API 查询替换为该 URL,如下所示:
http://www.bing.com/search?q=3+ts+site%3Amycharity.ie/charity&go=&form=QBRE&filt=all&qs=n&sk=&sc=8-5
我应该再次得到 0 个结果,对吧?
不,我得到 1 个结果。 (我使用 API 寻找的结果)。
这是为什么呢?这附近还有吗?
I'm using the Bing Search API 2.0 (XML) & PHP to retreive results.
But when running some queries, the API doesn't return the (same) results Bing.com would.
When I send this request: (This is using the API)
http://api.search.live.net/xml.aspx?Appid=__________&query=3+ts+site%3Amycharity.ie/charity&sources=web&web.count=10&web.offset=0
I get 0 results.
But if I go to Bing.com and search for bacon the URL would be:
http://www.bing.com/search?q=bacon&go=&form=QBRE&filt=all&qs=n&sk=&sc=8-5
So If I take I substitute in my API query into this URL like so:
http://www.bing.com/search?q=3+ts+site%3Amycharity.ie/charity&go=&form=QBRE&filt=all&qs=n&sk=&sc=8-5
I should get 0 results again, right?
No, I get the 1 result. (The result I was looking for with the API).
Why is this? Is there anyway around this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,Bing API 完全是脑死亡并且完全无用,因为这个事实。
但幸运的是,屏幕抓取是微不足道的:
Yes the Bing API is totally brain dead and utterly useless because of this fact.
But, luckily, screen scraping is trivial:
看起来 API 请求实际上并不是在请求信息。嗯,确实如此,但又不完全是。例子;
来自 bing 搜索; “search?q=bacon&go=&form” 注意其中的“bacon”一词。
这似乎不会在 API 请求中以任何方式进行解析。甚至不是十六进制值。我认为问题就在这里。
Doesnt look like the API request is actually requesting the information. Well, it is, but not quite. Example;
from the bing search; "search?q=bacon&go=&form" Note the word bacon in it.
This doesnt appear to be parsed in any way in the API request. Not even as a hex value. I believe that herein lies the problem.
也许存在一个问题,现已解决...
目前,如果我尝试以下查询 根据 Bing API 2.0 MSDN 制作,它们都返回相同的单个结果:
Perhaps there was an issue, which is now fixed...
Currently, if I'm trying the following queries made according to the Bing API 2.0 MSDN they all return the same single result: