I just started learning parsing and am having problems with it ... I need to scrape this value
here is my code
library(RSelenium)
rD <- rsDriver(browser="chrome",port=0999L,
verbose=F,chromever = "95.0.4638.54")
remDr <- rD[["client"]]
remDr$navigate("https://www.valutrades.com/en/sentiment")
webElem <- remDr$findElement(using = "......", value = "......")
Can someone help me with that ?
CodePudding user response:
The data you want to scrape is in iframe
.
One way to do is,
remDr$navigate('https://csi2.valutrades.com/sentimentgraph.php')
webElem <- remDr$findElement('xpath', '//*[@id="EURUSD"]')
webElem$getElementText()
[[1]]
[1] "EURUSDLongShort44.3U.7%"