hofstett

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: TweetScraper #115
    hofstett
    Keymaster

    It initially flagged this post as spam for some reason, I have now activated it!

    in reply to: Welcome to the forum! #113
    hofstett
    Keymaster

    This is weird, let me check. Comments should be online immediately (I think I do not need to accept them)…

    in reply to: Scraping YouTube comments #108
    hofstett
    Keymaster

    Rammy

    We played around with this actually yesterday, too. Have a look at this code, it reads the number of comments. Reading the comments should be relatively straightforward from there.

    Best, Reto

    library('RSelenium')
    
    rD <- rsDriver(port = 4447L, browser = c("firefox"))
    
    #chrome
    #rD <- rsDriver(port = 4449L, browser = c("chrome"), chromever = "83.0.4103.39")
    
    remDr <- rD[["client"]]
    
    remDr$navigate("https://www.youtube.com/watch?v=7WfoYl-EPtI")
    print(remDr$getCurrentUrl())
    
    webpage <- read_html(remDr$getPageSource()[[1]])
    remDr$screenshot(display = TRUE)
    
    html_text(html_nodes(webpage, ".count-text.style-scope.ytd-comments-header-renderer"))
Viewing 3 posts - 1 through 3 (of 3 total)