diff --git a/03_GettingData/02_03_readingFromTheWeb/index.Rmd b/03_GettingData/02_03_readingFromTheWeb/index.Rmd index aa76e2c..4af7924 100644 --- a/03_GettingData/02_03_readingFromTheWeb/index.Rmd +++ b/03_GettingData/02_03_readingFromTheWeb/index.Rmd @@ -75,7 +75,7 @@ url <- "http://scholar.google.com/citations?user=HI-I6C0AAAAJ&hl=en" html <- htmlTreeParse(url, useInternalNodes=T) xpathSApply(html, "//title", xmlValue) -xpathSApply(html, "//td[@id='col-citedby']", xmlValue) +xpathSApply(html, "//td[@class='gsc_a_c']", xmlValue) ``` --- diff --git a/03_GettingData/02_03_readingFromTheWeb/index.md b/03_GettingData/02_03_readingFromTheWeb/index.md index 8696029..25d4c34 100644 --- a/03_GettingData/02_03_readingFromTheWeb/index.md +++ b/03_GettingData/02_03_readingFromTheWeb/index.md @@ -76,13 +76,13 @@ xpathSApply(html, "//title", xmlValue) ``` ```r -xpathSApply(html, "//td[@id='col-citedby']", xmlValue) +xpathSApply(html, "//td[@class='gsc_a_c']", xmlValue) ``` ``` - [1] "Cited by" "397" "259" "237" "172" "138" "125" "122" - [9] "109" "101" "34" "26" "26" "24" "19" "13" -[17] "12" "10" "10" "7" "6" + [1] "434" "346" "335" "188" "185" "183" "155" "133" + [9] "130" "61" "58" "57" "48" "31" "19" "19" +[17] "18" "17" "13" "12*" ``` diff --git a/03_GettingData/02_04_readingFromAPIs/index.Rmd b/03_GettingData/02_04_readingFromAPIs/index.Rmd index 9cd5c5a..65f293e 100644 --- a/03_GettingData/02_04_readingFromAPIs/index.Rmd +++ b/03_GettingData/02_04_readingFromAPIs/index.Rmd @@ -83,7 +83,7 @@ homeTL = GET("https://api.twitter.com/1.1/statuses/home_timeline.json", sig) ```{r eval=FALSE} json1 = content(homeTL) -json2 = jsonlite::fromJSON(toJSON(json1)) +json2 = jsonlite::fromJSON(jsonlite::toJSON(json1)) json2[1,1:4] ``` diff --git a/03_GettingData/02_04_readingFromAPIs/index.md b/03_GettingData/02_04_readingFromAPIs/index.md index e0fc8a0..bd13883 100644 --- a/03_GettingData/02_04_readingFromAPIs/index.md +++ b/03_GettingData/02_04_readingFromAPIs/index.md @@ -73,7 +73,7 @@ homeTL = GET("https://api.twitter.com/1.1/statuses/home_timeline.json", sig) ```r json1 = content(homeTL) -json2 = jsonlite::fromJSON(toJSON(json1)) +json2 = jsonlite::fromJSON(jsonlite::toJSON(json1)) json2[1,1:4] ```