Guest User

Untitled

a guest
Jan 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. library(rvest)
  2. library(stringr)
  3.  
  4. link <- "https://247sports.com/college/iowa-state/Season/2017-Football/Commits?sortby=rank"
  5.  
  6. link.scrap <- read_html(link)
  7. data <-
  8. html_nodes(x = link.scrap,
  9. css = '#page-content > div.main-div.clearfix > section.list-page > section > section > ul.content-list.ri-list > li:nth-child(3)') %>%
  10. html_text(trim = TRUE) %>%
  11. trimws()
  12.  
  13. f<-strsplit(data,")")
  14. str_trim(f)
  15. [1] "c("Ray Lima El Camino College (Torrance, CA", " DT 6-3 310 0.8681 39 4 9 Enrolled 1/9/2017")"
Add Comment
Please, Sign In to add comment