0

I searched up and down but could not find any solution that would fit for the purpose.

I would like to scrape this page (table)

https://www.fxstreet.com/rates-charts/usdjpy/forecast

I tried couple of ways but could not get the data scrapped into a table.

library(XML)
library(RCurl)

url <-"https://www.fxstreet.com/rates-charts/usdjpy/forecast"
url2 <- getURL(url)
parsed <- htmlParse(url2)
Maximilian
  • 4,177
  • 7
  • 46
  • 85
  • 1
    Open up a new tab in Chrome. Open up "Developer Tools" (hunt around in the Chrome menus). Click the "Network" tab there and the "XHR" sub-tab. Navigate to that page. Look at the `xhr` requests. There's a gd chance you can find the data there but the main HTML page also has a large number of base64-encoded JSON data blobs it parses and generates data tables & charts from (and other dynamic content). So you may need to use `splashr` or `seleniumPipes` if you aren't comfortable dissecting & extracting on-page javascript. – hrbrmstr Oct 14 '17 at 15:23
  • @hrbrmstr ,this will be hard to follow, I will try my best, thanks! – Maximilian Oct 14 '17 at 15:42

1 Answers1

0

Try RSelenium.

Navigate your browser to this URL and wait for the elements to load. Try the technique discussed in this answer

how to check if page finished loading in RSelenium

Once complete loading, you can save the html and read with rvest package or choice of your own.