为什么Bing(和Bing自定义搜索)对某些维基百科页面没有返回结果?

问题描述 投票:0回答:1

我正试图在某些维基百科页面上使用必应自定义搜索。 然而,我发现有许多页面在必应自定义搜索(或必应搜索)中不返回任何结果。

例如,你可以在必应搜索 site:https://en.wikipedia.org/wiki/George_Washington name 并得到那一个网页的回复。 然而,如果你从以下任何一个狗种名称中选择(其实几乎是这个列表中的任何狗种。https:/en.wikipedia.orgwikiList_ofdog_breeds。):

https://wikipedia.org/wiki/Wire_Fox_Terrier
https://wikipedia.org/wiki/Kishu
https://wikipedia.org/wiki/English_Cocker_Spaniel

作为网站,搜索 site:{site_from_list_above} dog (例如 site:https://wikipedia.org/wiki/Wire_Fox_Terrier dog)没有结果。 是我搜索错了,还是Bing没有缓存这些页面?

wikipedia bing bing-api bing-custom-search
1个回答
0
投票

回答我自己的问题:在与Bing支持人员交谈并自己玩弄URL后,我发现有两个问题。

  1. URL不需要是重定向,因为... https://wikipedia.org/wiki/Kishu 带你到 https://en.wikipedia.org/wiki/Kishu.
  2. 含有特殊字符的URLs(如 https://en.wikipedia.org/wiki/Chihuahua_(dog) 需要被替换(这意味着"("替换为"%28",") "替换为"%29",等等)。 更多关于转义的细节可以在这里找到。https:/www.w3schools.comtagsref_urlencode.asp

希望对别人有所帮助!

© www.soinside.com 2019 - 2024. All rights reserved.