我想提取一些存在于DBPedia中的信息。所以,我写了一个使用.NET的System.Net.WebClient的应用程序,该应用程序获取url并以N-Triples格式(纯文本)返回url的内容。DBPedia使用WebClient和浏览器的不同结果
为url(与应用)中提取数据的结果是:
<http://dbpedia.org/resource/AfghanistanCommunications> <http://dbpedia.org/ontology/wikiPageRedirects> <http://dbpedia.org/resource/Communications_in_Afghanistan> . <http://dbpedia.org/resource/AfghanistanCommunications> <http://www.w3.org/ns/prov#wasDerivedFrom> <http://en.wikipedia.org/wiki/AfghanistanCommunications?oldid=74466499> . <http://dbpedia.org/resource/AfghanistanCommunications> <http://xmlns.com/foaf/0.1/isPrimaryTopicOf> <http://en.wikipedia.org/wiki/AfghanistanCommunications> . <http://dbpedia.org/resource/AfghanistanCommunications> <http://www.w3.org/2000/01/rdf-schema#label> "AfghanistanCommunications"@en .
但是,当我看到the url与我的浏览器,我从我已经提取非常不同的内容。
我检查与小提琴手,然后请求:
webClient.Headers.Add(HttpRequestHeader.UserAgent,“Mozilla的/ 4.0(兼容; MSIE 6.0; Windows NT的5.2; .NET CLR 1.0.3705; )“);
DBPedia是否将应用程序检测为机器人并返回的数据少于真实浏览器或我错过了其他内容?