Reputation: 1
I am trying to extract the tables from these pages (https://spactrack.net/activespacs/ & https://warrants.tech/). I am using Rcrawler package to extract them, but it's throwing me an error when I run the below code.
library(rvest)
library(xml2)
library(Rcrawler)
#install_browser(version = "2.1.1",
baseURL = "https://github.com/wch/webshot/releases/download/v0.3.1/")
LS <- browser_path()
#to extract from the first link
url <- "https://spactrack.net/activespacs/"
table <- ContentScraper(Url = url,
XpathPatterns = c("/html/body/section/div/div[2]/div/div/div[2]/div[2]/table"),
asDataFrame = TRUE, browser = LS)
#to extract from the second link:
url2 <- "https://warrants.tech/"
table2 <- ContentScraper(Url = url2,
XpathPatterns = c("/html/body/div[1]/div/div[2]/div[1]/div[2]/div/div[2]/div/div/div/table"),
asDataFrame = TRUE, browser = LS)
Could you help me extract these tables? Thank you.
Upvotes: 0
Views: 112