diff --git a/app/scripts/network-helper.js b/app/scripts/network-helper.js index e713a5c..be837b6 100644 --- a/app/scripts/network-helper.js +++ b/app/scripts/network-helper.js @@ -42,6 +42,11 @@ module.exports.fetchHTML = async function (url) { shared.logger.warn(`Unable to fetch HTML for ${url}`); return null; } + else if (!response.headers["content-type"].includes("text/html")) { + // The response is not a HTML page + shared.logger.warn(`The ${url} returned a ${response.headers["content-type"]} response`); + return null; + } return response.data; };