I would like to access to a web page with R and rcurl package. Here is my code :
library(RCurl)
library(XML)
URL <- "http://www.lfp.fr/ligue1/calendrier_resultat#sai=82&jour=1"
siteHTML <- getURL(url=URL)
xmltext <- htmlParse(siteHTML, asText=TRUE, encoding = 'UTF-8')
Date_Match <- sapply(xpathSApply(xmltext, '//*[@id="tableaux_rencontres"]//h4'), xmlValue)
Date_Match
The result is not good ... like if the jour=1 parameter doesn't not exist. If I try to access to this page with Firefox, it's Ok.
I have also try this code without success :
x <- getForm("http://www.lfp.fr/ligue1/calendrier_resultat",
jour="2",
sai="82")
xmltext <- htmlParse(x, asText=TRUE, encoding = 'UTF-8')
Date_Match <- sapply(xpathSApply(xmltext, '//*[@id="tableaux_rencontres"]//h4'), xmlValue)
Date_Match
Do you know why ? What is the solution ? Can you help me ? I'm beginner in R programming, so don't hesitate to give large explanation.