Hi,
which app do you mean?
- The LOC dataspace at
http://loc.openlinksw.com/sparql supports xml,
json, html, etc.
- Yahoo BOSS supports XML with RDF/XML as one subnode, and a feed format.
- The GoodRelations Search demo at
http://goodrelations-search.appspot.com/ is an early prototype that
currently supports only inspecting the Yahoo index. Thus, the output is
HTML only. If you want structured data, simply invoke the Yahoo BOSS
interface directly. This is very straightforward:
START ="0"
QUERY ="cars"
query = urllib.quote_plus(QUERY)
uri =
("
http://boss.yahooapis.com/ysearch/web/v1/%s?appid="+APPID+"&format=xml&view=searchmonkey_rdf&start=%s")
% (query, START)
yahooresult = urllib.urlopen(uri)
You can then extract the RDF data collected by Yahoo:
dom = minidom.parse(yahooresult)
results = []
elements = dom.getElementsByTagName('result')
for hit in elements:
abstract = hit.getElementsByTagName('abstract')
if len(abstract) == 0:
abstract = "No abstract available. "
else:
abstract = abstract[0].firstChild.data
clickurl = hit.getElementsByTagName('clickurl')[0].firstChild.data
dispurl = hit.getElementsByTagName('dispurl')[0].firstChild.data
rdf = hit.getElementsByTagName('searchmonkey_rdf')[0]
rdf = rdf.getElementsByTagName('rdf:RDF')
if len(rdf) == 0:
rdf = "No RDF Found"
else:
rdfdata = rdf[0].toxml()
rdfdata = parseRDF(rdfdata.encode('ascii', 'replace')) #
TODO: Find better solution for non-ascii content in RDF
rdf = "RDF metadata found (%d statements)" % len(rdfdata)
You need a Yahoo APP ID, which is available for free.
Best
Martin
Laurian Gridinoc wrote:
>
Hello,
>
>
Is there any parameter which would allow me to retrieve the search results
>
in json, or xml; currently the html output is hardly usable with XPath.
>
>
Thank you,
>
Laurian Gridinoc
>
http://purl.org/net/laur
>
>
--
--------------------------------------------------------------
martin hepp
e-business & web science research group
universitaet der bundeswehr muenchen
e-mail:
mhepp at computer.orgphone: +49-(0)89-6004-4217
fax: +49-(0)89-6004-4620
www:
http://www.unibw.de/ebusiness/ (group)
http://www.heppnetz.de/ (personal)
skype: mfhepp
twitter: mfhepp
Check out GoodRelations for E-Commerce on the Web of Linked Data!
=================================================================
Webcast:
http://www.heppnetz.de/projects/goodrelations/webcast/Recipe for Yahoo SearchMonkey:
http://tr.im/rAbNTalk at the Semantic Technology Conference 2009:
"Semantic Web-based E-Commerce: The GoodRelations Ontology"
http://tinyurl.com/semtech-heppTalk at
Overview article on Semantic Universe:
http://tinyurl.com/goodrelations-universeProject page:
http://purl.org/goodrelations/Resources for developers:
http://www.ebusiness-unibw.org/wiki/GoodRelationsTutorial materials:
CEC'09 2009 Tutorial: The Web of Data for E-Commerce: A Hands-on Introduction to the GoodRelations Ontology, RDFa, and Yahoo! SearchMonkey
http://tr.im/grcec09-------------- next part --------------
A non-text attachment was scrubbed...
Name: martin_hepp.vcf
Type: text/x-vcard
Size: 319 bytes
Desc: not available
URL: <
http://ebusiness-unibw.org/pipermail/goodrelations/attachments/20091007/04c33275/attachment.vcf>