From c3a785b9b5611ba72fa0dfb15af48d1a1c1aee95 Mon Sep 17 00:00:00 2001 From: Logan Rockmore Date: Mon, 17 Feb 2020 05:21:07 -0600 Subject: [PATCH] fix: the Vulture feeds so that they properly fetch the URLs. (#4015) --- lib/routes/vulture/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/routes/vulture/utils.js b/lib/routes/vulture/utils.js index e84412757..9fca6f710 100644 --- a/lib/routes/vulture/utils.js +++ b/lib/routes/vulture/utils.js @@ -62,7 +62,11 @@ const getData = async (ctx, url, title) => { const htmlData = htmlResponse.data; const $ = cheerio.load(htmlData); - const dataUri = $('section.paginated-feed').attr('data-uri'); + let dataUri = $('section.paginated-feed').attr('data-uri'); + + if (dataUri.startsWith('www.')) { + dataUri = 'https://' + dataUri; + } // get the raw data const response = await got({