Użycie R do połączenia Selenium-Server-Standalone

W odniesieniu do postuDostęp do API Selenium w R na tej stronie mogę utworzyć webdriver. Jednak nie mogę uzyskać szczegółów elementu tak samo jak Python. Czy mogę wiedzieć, jak to zrobić?

Chciałbym zeskrobać tabelę meczów piłkarskich każdej rundy ...

# using R
library(RCurl)
library(RJSONIO)
library(XML)

# running selenium
system("java -jar selenium-server-standalone-2.35.0.jar")
baseURL<-"http://localhost:4444/wd/hub/"
server<-list(desiredCapabilities=list(browserName='firefox',javascriptEnabled=TRUE))

getURL(paste0(baseURL,"session"),
       customrequest="POST",
       httpheader=c('Content-Type'='application/json;charset=UTF-8'),
       postfields=toJSON(server))

serverDetails<-fromJSON(rawToChar(getURLContent('http://localhost:4444/wd/hub/sessions',binary=TRUE)))
serverId<-serverDetails$value[[1]]$id

# navigate to 7m.cn
URL = "http://data2.7m.cn/history_Matches_Data/2009-2010/92/en/index.shtml"
getURL(paste0(baseURL,"session/",serverId,"/url"),
       customrequest="POST",
       httpheader=c('Content-Type'='application/json;charset=UTF-8'),
       postfields=toJSON(list(url=URL)))

Poniżej znajdują się kody w Pythonie, aby uzyskać szczegółowe informacje o elemencie HTML z 7m.cn. Poza tym, każdy lepszy pomysł, by zasugerować? Dzięki.

# using Python
import codecs
import lxml.html as lh
from selenium import webdriver

URL = 'http://data2.7m.cn/history_Matches_Data/2009-2010/92/en/index.shtml'
browser = webdriver.Firefox()
browser.get(URL)
content = browser.page_source
browser.quit()

questionAnswers(1)

yourAnswerToTheQuestion