How to convert relative URL to absolute URL?

I'm scraping Google News and storing the data in a data frame with two columns - title and URL. But I want the absolute URL, that is the URL of the page that is getting redirected and not the URL. How do I do that?

news <- function(term) {
  html_dat <- read_html(paste0("",term,"&hl=en-US&gl=US&ceid=US%3Aen"))

  dat <- data.frame(Link = html_dat %>%
                      html_nodes('.WwrzSb') %>% 
                      html_attr('href')) %>% 
    mutate(Link = gsub("./articles/","",Link))
  news_dat <- data.frame(
    Title = html_dat %>%
      html_nodes('.IFHyqb.DeXSAc .JtKRv') %>% 
    Link = dat$Link

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.