为什么Bing Search API会返回原始网址替换为bing重定向网址的项目? [英] Why Bing Search API returns items with the original url replaced with a bing redirection url?
问题描述
Bing Search API在"值"中返回的结果数组的url值替换为Bing重定向网址(https://www.bing.com/cr?ID = ....)。
示例:
$
" url":" https://www.bing.com/cr?IG = 33FC61BA007E45E0B46BB603C6F92752& CID = 20A03B0DD50361591DAF32B6D4326084& rd = 1& h = _92RdWhJPaZA1zDakfhAN0RJcqCKIsQXip4ETdwGEFU& v = 1& r = https%3a%2f%2fwww.entensive.com%2f& p = DevEx,5085.1"
I' d期望每个结果网址都具有原始网址值,如下所示:
" url":" https://www.entensive.com/"
这是我使用标题中传递的订阅密钥的URL请求(我有针对Bing Search的Azure认知服务的标准计划):
https://api.cognitive.microsoft.com/bing/v5.0/search?q=%2B%22entensive%22&count=10&offset=0&mkt = en-us& safesearh = moderate
这是我得到的回复(我只粘贴部分回复):
{
"_type":"SearchResponse","
"webPages":{
  " webSearchUrl" ;:" HTTPS:?//www.bing.com/cr IG = 33FC61BA007E45E0B46BB603C6F92752&安培; CID = 20A03B0DD50361591DAF32B6D4326084&安培; RD = 1&安培; H = UjmROkGwEWKIYiWsfwh7Z3BHLuBrcLoWy1RKlXY873c&安培; V = 1和; R = HTTPS%3A%2F%2fwww.bing .com%2fsearch%3fq%3d%252b%2522entensive%2522& p = DevEx,5307.1",
  "totalEstimatedMatches":16300,
  "价值":[
    {
      " id":" https://api.cognitive.microsoft.com/api/v5/#WebPages.0",
      "name":"Entensive","
      " url":" https://www.bing.com/cr?IG = 33FC61BA007E45E0B46BB603C6F92752& CID = 20A03B0DD50361591DAF32B6D4326084& rd = 1& h = _92RdWhJPaZA1zDakfhAN0RJcqCKIsQXip4ETdwGEFU& v = 1& r = https%3a%2f%2fwww.entensive .com%2f& p = DevEx,5085.1",
      " displayUrl":" https://www.entensive.com",
      "snippet":"Entensive Official Website - 社交网络内容发现平台 - #socialmedia#contentdiscovery",
      " dateLastCrawled":" 2016-10-17T08:57:00"
    },b $ b     {
      " id":" https://api.cognitive.microsoft.com/api/v5/#WebPages.1",
      "name":"Entensive(@entensive)| Twitter",
      "url":" https://www.bing.com/cr?IG = 33FC61BA007E45E0B46BB603C6F92752& CID = 20A03B0DD50361591DAF32B6D4326084& rd = 1& h = FzaHm8Dl67M3Kl8PqVyr8mldr6lJgLJP3lZTNGWSUH4& v = 1& r = https%3a%2f%2ftwitter.com %2fentensive& p = DevEx,5101.1",
      " displayUrl":" https://twitter.com/entensive",
      "snippet":"来自Entensive的最新推文(@entensive)。社交媒体#Keywords Tracking,#Content#Suggesches,#Scheduling和#Publishing for Twitter,Facebook,LinkedIn ...",
      " dateLastCrawled":" 2016-10-18T10:00:00"
    },b $ b     {
      " id":" https://api.cognitive.microsoft.com/api/v5/#WebPages.2",
      "name":"登录 - entensive.com",
      " url":" https://www.bing.com/cr?IG = 33FC61BA007E45E0B46BB603C6F92752& CID = 20A03B0DD50361591DAF32B6D4326084& rd = 1& h = PnkOEgoVr1eZXh_uECY_zvMWzDvJ0aosoPHWU7c7q28& v = 1& r = https%3a%2f%2fwww.entensive .com%2fsignin& p = DevEx,5114.1",
      " displayUrl":" https://www.entensive.com/signin",
      " snippet":"欢迎来到ENTENSIVE。使用Twitter登录使用LinkedIn登录使用Facebook登录","
      " dateLastCrawled":" 2016-10-13T04:53:00"
    },b $ b     {
      " id":" https://api.cognitive.microsoft.com/api/v5/#WebPages.3",
      "name":"数据密集型计算 - 维基百科","
      " url" ;:\"https://www.bing.com/cr?IG = 33FC61BA007E45E0B46BB603C6F92752& CID = 20A03B0DD50361591DAF32B6D4326084& rd = 1& h = EPgGqbVbCDERKlK3VLFYSSyvds5BxANTW4BOuS95iSY& v = 1& r = https%3a%2f%2fen.wikipedia .org%2fwiki%2fData-intensive_computing& p = DevEx,5132.1",
      "约":[
        {
          "名称":"数据密集型计算"&b
        }¥b $ b       ],
      " displayUrl":" https://en.wikipedia.org/wiki/Data-intensive_computing",
      "片段":"数据密集型计算是一类并行计算应用程序,它使用数据并行方法处理大量数据,通常是太字节或......",b
      " dateLastCrawled":" 2016-10-13T19:35:00"
    },
...
Hello Damiano,
来自Microsoft Azure的问候。
以下主题中有类似的讨论:
http://stackoverflow.com/questions/38337074 / azure-files-share-with-arm-templates-possible
问候,
Sapna Girish
The results returned by Bing Search API within the "value" array have the url value replaced with a Bing redirection url (https://www.bing.com/cr?ID=....).
Example:
"url": "https://www.bing.com/cr?IG=33FC61BA007E45E0B46BB603C6F92752&CID=20A03B0DD50361591DAF32B6D4326084&rd=1&h=_92RdWhJPaZA1zDakfhAN0RJcqCKIsQXip4ETdwGEFU&v=1&r=https%3a%2f%2fwww.entensive.com%2f&p=DevEx,5085.1"
I'd expect each result url to have the original url value instead, like this:
"url": "https://www.entensive.com/"
Here is my URL request using my subscription key passed in the headers (I have a Standard plan on Azure Cognitive Service for Bing Search):
https://api.cognitive.microsoft.com/bing/v5.0/search?q=%2B%22entensive%22&count=10&offset=0&mkt=en-us&safesearh=moderate
Here is the response I get (I only pasted part of the response):
{
"_type": "SearchResponse",
"webPages": {
"webSearchUrl": "https://www.bing.com/cr?IG=33FC61BA007E45E0B46BB603C6F92752&CID=20A03B0DD50361591DAF32B6D4326084&rd=1&h=UjmROkGwEWKIYiWsfwh7Z3BHLuBrcLoWy1RKlXY873c&v=1&r=https%3a%2f%2fwww.bing.com%2fsearch%3fq%3d%252b%2522entensive%2522&p=DevEx,5307.1",
"totalEstimatedMatches": 16300,
"value": [
{
"id": "https://api.cognitive.microsoft.com/api/v5/#WebPages.0",
"name": "Entensive",
"url": "https://www.bing.com/cr?IG=33FC61BA007E45E0B46BB603C6F92752&CID=20A03B0DD50361591DAF32B6D4326084&rd=1&h=_92RdWhJPaZA1zDakfhAN0RJcqCKIsQXip4ETdwGEFU&v=1&r=https%3a%2f%2fwww.entensive.com%2f&p=DevEx,5085.1",
"displayUrl": "https://www.entensive.com",
"snippet": "Entensive Official Website - Content Discovery Platform for the Social Web - #socialmedia #contentdiscovery",
"dateLastCrawled": "2016-10-17T08:57:00"
},
{
"id": "https://api.cognitive.microsoft.com/api/v5/#WebPages.1",
"name": "Entensive (@entensive) | Twitter",
"url": "https://www.bing.com/cr?IG=33FC61BA007E45E0B46BB603C6F92752&CID=20A03B0DD50361591DAF32B6D4326084&rd=1&h=FzaHm8Dl67M3Kl8PqVyr8mldr6lJgLJP3lZTNGWSUH4&v=1&r=https%3a%2f%2ftwitter.com%2fentensive&p=DevEx,5101.1",
"displayUrl": "https://twitter.com/entensive",
"snippet": "The latest Tweets from Entensive (@entensive). Social Media #Keywords Tracking, #Content #Suggestions, #Scheduling and #Publishing for Twitter, Facebook, LinkedIn ...",
"dateLastCrawled": "2016-10-18T10:00:00"
},
{
"id": "https://api.cognitive.microsoft.com/api/v5/#WebPages.2",
"name": "Sign in - entensive.com",
"url": "https://www.bing.com/cr?IG=33FC61BA007E45E0B46BB603C6F92752&CID=20A03B0DD50361591DAF32B6D4326084&rd=1&h=PnkOEgoVr1eZXh_uECY_zvMWzDvJ0aosoPHWU7c7q28&v=1&r=https%3a%2f%2fwww.entensive.com%2fsignin&p=DevEx,5114.1",
"displayUrl": "https://www.entensive.com/signin",
"snippet": "Welcome to ENTENSIVE. Sign in with Twitter Sign in with LinkedIn Sign in with Facebook",
"dateLastCrawled": "2016-10-13T04:53:00"
},
{
"id": "https://api.cognitive.microsoft.com/api/v5/#WebPages.3",
"name": "Data-intensive computing - Wikipedia",
"url": "https://www.bing.com/cr?IG=33FC61BA007E45E0B46BB603C6F92752&CID=20A03B0DD50361591DAF32B6D4326084&rd=1&h=EPgGqbVbCDERKlK3VLFYSSyvds5BxANTW4BOuS95iSY&v=1&r=https%3a%2f%2fen.wikipedia.org%2fwiki%2fData-intensive_computing&p=DevEx,5132.1",
"about": [
{
"name": "Data-intensive computing"
}
],
"displayUrl": "https://en.wikipedia.org/wiki/Data-intensive_computing",
"snippet": "Data-intensive computing is a class of parallel computing applications which use a data parallel approach to processing large volumes of data typically terabytes or ...",
"dateLastCrawled": "2016-10-13T19:35:00"
},
...
Hello Damiano,
Greetings from Microsoft Azure.
There is a similar discussion in the below thread:
http://stackoverflow.com/questions/38337074/azure-files-share-with-arm-templates-possible
Regards,
Sapna Girish
这篇关于为什么Bing Search API会返回原始网址替换为bing重定向网址的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!