Has anyone ever received this error when trying to web scrape a site:
Error in feed_push_parser(readBin(con, raw(), n), reset = TRUE) :
lexical error: invalid char in json text.
<!doctype html><html xmlns="htt
(right here) ------^
I do not understand why I am receiving this error when I scraped the first page of the site no problem with the same declaration on that first page. But the second page I get this error. Is there a way around this?
This works fine:
jsonlite::fromJSON("http://ift.tt/2gqd8y7", flatten = TRUE)
Get the error here:
jsonlite::fromJSON("http://ift.tt/2gc9AwQ", flatten = TRUE)
Aucun commentaire:
Enregistrer un commentaire