Getting stock news data from google in R [closed]

2019-05-16 12:27发布

I can use quantmod to get historical data and close-to-realtime quotes for stocks. I can also use quantmod to get financials data from Google. Are there any existing R packages that would let me grab Google's news feed for a given stock?

If not, is there a package for reading and parsing RSS feeds in R?

3条回答
祖国的老花朵
2楼-- · 2019-05-16 13:05

Sure, RSS is after all XML, so use the XML package.

查看更多
Bombasti
3楼-- · 2019-05-16 13:07

There's also a (not yet on CRAN) package that does some of the nitty gritty of parsing RSS feeds (and Atom) for you - nothing fancy, just some of the basic cleaning, normalization between the RSS and Atom spec, etc.

You can grab it from https://github.com/noahhl/r-does-rss

(full disclosure, I wrote it)

查看更多
混吃等死
4楼-- · 2019-05-16 13:20

I wrote my own function to do this, using XML and xts. I posted it as a question on SO, because I think it could be improved.

查看更多
登录 后发表回答