2013-03-15 2 views
2

DBPedia에있는 정보를 추출하고 싶습니다. 따라서, .NET의 System.Net.WebClient을 사용하여 응용 프로그램을 작성했습니다. URL은 N-Triples 형식 (일반 텍스트)의 url을 반환합니다. 내 브라우저 the url을 볼 때, 나는 추출 된 적이있는 매우 다른 콘텐츠를,WebClient 및 브라우저를 사용하는 DBPedia의 결과가 다릅니다.

<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 . 

그러나 :

(응용 프로그램 포함) url에 대한 추출 된 데이터의 결과입니다.

내가 다음 피들러와 함께 요청 확인 :

webClient.Headers.Add (HttpRequestHeader.UserAgent를, "Mozilla/4.0 (호환되는; MSIE 6.0; 윈도우 NT 5.2; .NET CLR 1.0.3705;) ");

DBPedia는 응용 프로그램을 로봇으로 감지하고 실제 브라우저보다 적은 데이터를 반환합니까? 아니면 다른 것을 놓쳤습니까?!

http://dbpedia.org/data/AfghanistanCommunications.ntriples 

하지만 웹 브라우저가 표시되고있는 것은 :

답변

1

어떤 응용 프로그램이 요청하는 것은 확실히

http://dbpedia.org/data/Communications_in_Afghanistan.ntriples 

당신이 http://dbpedia.org/resource/AfghanistanCommunications 또는 http://dbpedia.org/page/AfghanistanCommunications에 가면 웹 브라우저, 당신이 경우 특정 형식을 묻지 않는 한 http://dbpedia.org/page/Communications_in_Afghanistan으로 리디렉션되었습니다. 리디렉션의 이유는 위키 백과에서 http://en.wikipedia.org/wiki/AfghanistanCommunications에서 http://en.wikipedia.org/wiki/Communications_in_Afghanistan으로 리디렉션되기 때문입니다. 3 배로 신청서를 볼 수 있습니다 :

<http://dbpedia.org/ontology/wikiPageRedirects> 
관련 문제