where did you find this node class ? I can't find it in the page using dev tool pane in firefox. I think it is why it gets you nothing.
You need to select the correct css class of the node you want to extract. Do you want to look for the solution yourself as an exercice or do you want the answer ? (I manage to do it and have it if you want)
EDIT: I put one solution in hiding if you want to see, you can that way
Get a table with courses list from track
library(rvest)
#> Le chargement a nécessité le package : xml2
test_url <- "https://www.datacamp.com/tracks/data-scientist-with-r"
test_xml <- read_html(test_url)
library(tibble)
tibble::tibble(
name = test_xml %>% html_nodes(".course-block__title") %>% html_text(),
author = test_xml %>% html_nodes(".course-block__author-name") %>% html_text(),
description = test_xml %>% html_nodes(".course-block__description") %>% html_text() %>% stringr::str_trim(),
length = test_xml %>% html_nodes(".course-block__length") %>% html_text() %>% stringr::str_trim(),
link = paste0("https://www.datacamp.com", test_xml %>% html_nodes(".course-block__link") %>% html_attr("href"))
)
#> # A tibble: 23 x 5
#> name author description length link
#> <chr> <chr> <chr> <chr> <chr>
#> 1 Introduction~ Jonathan~ Master the basics of d~ 4 hou~ https://www.data~
#> 2 Intermediate~ Filip Sc~ Continue your journey ~ 6 hou~ https://www.data~
#> 3 Introduction~ David Ro~ Get started on the pat~ 4 hou~ https://www.data~
#> 4 Importing Da~ Filip Sc~ In this course, you wi~ 3 hou~ https://www.data~
#> 5 Importing Da~ Filip Sc~ Parse data in any form~ 3 hou~ https://www.data~
#> 6 Cleaning Dat~ Nick Car~ Learn to explore your ~ 4 hou~ https://www.data~
#> 7 Importing & ~ Nick Car~ In this series of four~ 4 hou~ https://www.data~
#> 8 Writing Func~ Hadley W~ Learn the fundamentals~ 4 hou~ https://www.data~
#> 9 Data Manipul~ Garrett ~ Master techniques for ~ 4 hou~ https://www.data~
#> 10 Joining Data~ Garrett ~ This course will show ~ 4 hou~ https://www.data~
#> # ... with 13 more rows
Created on 2018-12-28 by the reprex package (v0.2.1)