Skip to content

Instantly share code, notes, and snippets.

@long39ng
Last active July 26, 2021 12:24
Show Gist options
  • Save long39ng/7d00e98b2cfa25c15544322fadd7516a to your computer and use it in GitHub Desktop.
Save long39ng/7d00e98b2cfa25c15544322fadd7516a to your computer and use it in GitHub Desktop.
library(RSelenium)
selenium_driver <- rsDriver(browser = "firefox")
selenium_driver$client$navigate("https://impffrei.work/wp-sitemap-posts-job_listing-1.xml") # :facepalm:
Sys.sleep(12)
page_source <- selenium_driver$client$getPageSource()
selenium_driver$server$stop()
html <- xml2::read_html(page_source[[1]])
library(rvest)
urls <- html |>
html_elements("#sitemap__table a") |>
html_attr("href")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment