|
|
@@ -51,41 +51,57 @@ getOvalide <- function(CHUuser, CHUpass, ATIHuser, ATIHpass, annee, mois) |
|
|
|
unlink("cookie.jar") |
|
|
|
|
|
|
|
# Cookie |
|
|
|
print("COOKIE") |
|
|
|
system(str_c(curl, pasrel)) |
|
|
|
|
|
|
|
# Token |
|
|
|
print("TOKEN") |
|
|
|
getURL(pasrel, .opts = curlopts) %>% |
|
|
|
read_html %>% |
|
|
|
html_node("input[name='lt']") %>% |
|
|
|
html_attr("value") -> token |
|
|
|
print(token) |
|
|
|
|
|
|
|
# Login |
|
|
|
system(str_c(curl, '-d "username=', ATIHuser, '&password=', curlPercentEncode(ATIHpass), '<=', token, '&_eventId=submit&submit=SE+CONNECTER" ', url)) |
|
|
|
print("LOGIN") |
|
|
|
system(str_c(curl, '-d "username=', ATIHuser, '&password=', curlPercentEncode(ATIHpass), '<=', token, '&_eventId=submit&submit=SE+CONNECTER" ', pasrel)) |
|
|
|
|
|
|
|
# Auth |
|
|
|
getURL(str_c(epmsi, 'authenticate.do'), |
|
|
|
.opts = curlopts) |
|
|
|
print("AUTH") |
|
|
|
system(str_c(curl, epmsi, 'authenticate.do')) |
|
|
|
# getURL(str_c(epmsi, 'authenticate.do'), |
|
|
|
# .opts = curlopts) %>% |
|
|
|
# cat |
|
|
|
|
|
|
|
# Applis |
|
|
|
print("APPLIS") |
|
|
|
getURL(str_c(epmsi, 'jsp/epmsi/applis/applis.jsp'), |
|
|
|
.opts = curlopts) |
|
|
|
.opts = curlopts) %>% |
|
|
|
cat |
|
|
|
|
|
|
|
# Ovalide |
|
|
|
print("OVALIDE") |
|
|
|
getURL(str_c(epmsi, 'jsp/epmsi/applis/applisMat2a.jsp'), |
|
|
|
referer = str_c(epmsi, 'jsp/epmsi/applis/applis.jsp'), |
|
|
|
.opts = curlopts) |
|
|
|
.opts = curlopts) %>% |
|
|
|
cat |
|
|
|
|
|
|
|
# Ovalide MCO T2A |
|
|
|
print("MCO T2A") |
|
|
|
getURL(str_c(epmsi, 'appli_16.do?champPmsi=1&statut=1&applicationType=3'), |
|
|
|
referer = str_c(epmsi, 'jsp/epmsi/applis/applisMat2a.jsp'), |
|
|
|
.opts = curlopts) |
|
|
|
.opts = curlopts) %>% |
|
|
|
cat |
|
|
|
|
|
|
|
# Resultats pour annee/mois |
|
|
|
print("RESULTATS") |
|
|
|
getURL(str_c(epmsi, 'appli_05.do?year=', annee, '&period=', mois), |
|
|
|
referer = str_c(epmsi, 'appli_16.do?champPmsi=1&statut=1&applicationType=3'), |
|
|
|
.opts = curlopts) |
|
|
|
.opts = curlopts) %>% |
|
|
|
cat |
|
|
|
|
|
|
|
# Tableaux |
|
|
|
print("TABLEAUX") |
|
|
|
getBinaryURL(str_c(epmsi, 'appli_05.zip?action=4&win=1'), |
|
|
|
referer = str_c(epmsi, 'appli_05.do?year=', annee, '&period=', mois), |
|
|
|
.opts = curlopts) %>% |
|
|
|