Skip to content

Instantly share code, notes, and snippets.

@hrbrmstr
Created April 15, 2018 20:05
Show Gist options
  • Save hrbrmstr/715a18e14ae926e1776ae74f33517e13 to your computer and use it in GitHub Desktop.
Save hrbrmstr/715a18e14ae926e1776ae74f33517e13 to your computer and use it in GitHub Desktop.
library(splashr) # you *need* to read https://github.com/hrbrmstr/splashr to run this script
library(urltools)
library(tidyverse)
splash_active() # if this does not return "TRUE" nothing will work
site <- render_har(url = "URL_TO_EVALUATE", response_body = TRUE)
map_chr(site$log$entries, c("response", "url")) %>%
urltools::domain() %>%
urltools::suffix_extract() %>%
mutate(tld = sprintf("%s.%s", domain, suffix)) %>%
count(tld, sort = TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment