string query =「123」;Bing搜索API無法獲得阿拉伯語的任何結果
// Create a Bing container.
string rootUrl = "https://api.datamarket.azure.com/Bing/Search";
var bingContainer = new Bing.BingSearchContainer(new Uri(rootUrl));
// The market to use.
string market = "ar-XA";
// Get news for science and technology.
string newsCat = "rt_ScienceAndTechnology";
bingContainer.Credentials = new NetworkCredential(「...」,「...」);
//構建查詢,限制爲10個結果。 var newsQuery = bingContainer.News(query,null,market,null,null,null,null,newsCat,null); var newQueryQuery = newsQuery = newsQuery.AddQueryOption(「$ top」,10);
//Run the query and display the results.
var newsResults = newsQuery.Execute();
foreach (var result in newsResults)
{
Console.WriteLine("{0}-{1}\n\t{2}",
result.Source, result.Title, result.Description);
}
爲什麼這項工作對其他語言如日本,不僅不能工作了阿拉伯語!難道bing搜索API尚未在阿拉伯做任何測試?