質問

In the Blekko search engine you can get the search results in JSON format, e.g. with the search term 'lifehacker':

http://blekko.com/ws/?q=lifehacker+%2Fjson

How could you carry out this query from R and parse the content? [There is a URL, a RSS URL and a snippet with the main text.]

I have tried packages tm.plugin.webmining and boilerpipeR, but couldn't figure it out.

役に立ちましたか?

解決

Using Rcurl and RJSONIO packages is very handy to retrieve rjson results:

library(RCurl)
library(RJSONIO)
doc <-  getURL('http://blekko.com/ws/?q=lifehacker+%2Fjson')
doc.ll <- fromJSON(doc)

Then you can check the result like this :

doc.ll$RESULT
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top