79151317

Date: 2024-11-02 18:08:14
Score: 2
Natty:
Report link

Thanks @margusl,

using your code I was able to create the following for loop for those that are curious.

 #create empty list
store_info_0 <- list()

#loop over all_store_urls
for (i in 1:length(all_store_urls)) {
  # set row specific url
  html <- read_html(all_store_urls[i])
  
  # Extract information
  store_info_0[[i]] <- list(
    Name = html %>% html_element(".store-details h1") %>% html_text(trim = TRUE),
    Address = html %>% html_element(".store-details .store-address") %>% html_text(trim = TRUE),
    Phone   = html %>% html_element(".store-details .store-phone") %>% html_text(trim = TRUE),
    Missing = html %>% html_element(".store-details .not-present") %>% html_text(trim = TRUE)
  ) %>% 
  tibble::as_tibble(name = "web")
}



store_info_0
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @margusl
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Ben