I want to scrape the website: link
I use GET
from httr
, and get the json lite object, but without quotes, like below:
"hxbase_json1({sum:3003,list:[{Number:'1'...
So jsonlite::fromJSON
cannot read this json..
My code is
url <- 'http://stockdata.stock.hexun.com/zrbg/data/zrbList.aspx?'
date <- '2015-12-31'
page <- 1
res <- GET(url, query = list(date = date,
count = 20,
pname = 20,
titType = 'null',
page = page
))
resC <- content(res)
resC1 <- jsonlite::fromJSON(resC)
I was wondering is there any package adding quotes to json automatically? Or is there anyway to read such json ?