Error when webscraping with script

I have never uses Scripts in R before and i’m trying to scrape some websites via a script but get an error “Error : No method asJSON S3 class: xml_node” when running this code

library(rvest)
example <- read_html("https://rvest.tidyverse.org/articles/starwars.html")

Any idea why this doesn’t work?

Hello @Just_Vervaart

If you want to use Rscript to get data, you would need to use “Rscript” in “DataFrames”, not from “Scripts”.

As you can see in the image, by converting the retrieved HTML to “DataFrames”, I believe it will be possible to handle it in Exploratory.

I hope this will be helpful.