From c4d61d0e4076ac18a43dce45ad0261c50e5236f3 Mon Sep 17 00:00:00 2001 From: Daniel Pett Date: Sun, 21 Aug 2022 13:35:46 +0100 Subject: [PATCH] Fix gsub on string Links were rendering incorrectly when HTTPS URLs were returned. --- fitz-twitter-art-bot-tweet.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fitz-twitter-art-bot-tweet.R b/fitz-twitter-art-bot-tweet.R index 6739451..7777b3e 100644 --- a/fitz-twitter-art-bot-tweet.R +++ b/fitz-twitter-art-bot-tweet.R @@ -3,7 +3,7 @@ library(rtweet) library(jsonlite) random <- fromJSON("https://data.fitzmuseum.cam.ac.uk/random") contentUrl <- 'https://data.fitzmuseum.cam.ac.uk/imagestore/' -uri <- gsub("http","https",random$admin$uri) +uri <- gsub("http:","https:",random$admin$uri) accession <- as.list(random$identifier$accession_number) number <- accession[1] images <- random$multimedia$processed