cderv
October 16, 2019, 9:36pm
2
I can't says what going on in your dockerfile but just to share about webscraping, know that phantomJS is no more maintained.There is other tools that could do the job as well
See
The page you are trying to scrape is dynamically loaded using some js script.
You can see that because, in the html code you get, there is one node for #version-jump, so you get nothing when asking for the second node
library(rvest)
#> Le chargement a nécessité le package : xml2
url <- paste0("https://sofifa.com//player/230621")
html <- xml2::read_html(url)
html %>% html_nodes("#version-jump")
#> {xml_nodeset (1)}
#> [1] <select id="version-jump" class="form-select redirect"><option value ...
html %>% html_nodes("#version-jump > option")
#> {xml_nodeset (1)}
#> [1] <option value="">History Version</option>
Created on 2019-05-01 by the reprex package (v0.2.1.9000)
You need to use a packa…