悬赏 100 个论坛币 已解决
最近在帮朋友用R写一个抓取运彩网站所有赛事赔率的编程,但碰到一个地方卡住。
在单一赛事中的json(如:https://www.sportslottery.com.tw/web/services/rs/betting/games/15102/0.json?eventMethods=1&eventMethods=2&nevIds=70383&locale=en&brandId=defaultBrand&channelId=1),所有赔率被丢进markets这个变项,我看了许多技术文件,都无法把里面的变项再分割出来。
我的指令:
library(jsonlite)
jsondallas <- fromJSON("https://www.sportslottery.com.tw/web/services/rs/betting/games/15102/0.json?eventMethods=1&eventMethods=2&nevIds=70383&locale=en&brandId=defaultBrand&channelId=1")
我要的格式是:
402 401 400 405 404 403......
3.2 3 1.95 1.55 1.21 1.18.....
不知道该怎么处理?
多谢