简体   繁体   中英

How to get RDF data returned by remote HTTP IRI through linux curl (e.g. DBpedia, GENEPIO ...)?

I know that the following remote HTTP IRI can be parsed directly with 'curl http://xxx' because they return RDF data directly:

在此处输入图像描述

But I don't know how the following remote HTTP IRI can be parsed directly, because they don't return RDF data directly:

在此处输入图像描述

在此处输入图像描述

How to get RDF data returned by remote HTTP IRI through linux curl (eg DBpedia, GENEPIO...)?

Best regards

You have to set the Accept header to specify which MIME types you accept/prefer:

curl -L -H "Accept: text/turtle; q=1.0, application/rdf+xml; q=0.5" http://dbpedia.org/resource/Resource_Description_Framework

In this case, you would prefer Turtle (relative quality factor of 1.0) over RDF/XML (0.5).

(The option -L lets curl follow redirects. For example, from http://dbpedia.org/resource/Resource_Description_Framework to http://dbpedia.org/data/Resource_Description_Framework.ttl .)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM