Please I am trying to scrape the keywords of trending topics from the google news website in r studio. I used both the rvest and deplyr packages. I also used selector gadget in google chrome to find the tags for the keywords.
Here is my code below:
> google.news<-read_html("https://news.google.com/topstories?hl=en-NG&gl=NG&ceid=NG:en")
> google.news %>%
+ +html_nodes(".boy4he") %>%
+ +html_text()
Error in UseMethod("xml_find_all") :
no applicable method for 'xml_find_all' applied to an object of class "character"
Can somebody please advise me on what could be wrong? Thanks
Thanks nirgrahamuk. This code does scrape some data, but it does not present it in the format I want, which makes analysis easier, unlike if it was scraped with dplyr. Thanks again for your help; it is very much appreciated.