gsd 2 years ago
parent
commit
37fcb4043f
  1. 8
      src/main/java/app/updates/PreviewUpdater.java

8
src/main/java/app/updates/PreviewUpdater.java

@ -76,18 +76,14 @@ public class PreviewUpdater extends BaseUpdater{
logger.info("Request: {}", url); logger.info("Request: {}", url);
restTemplate.headForHeaders(url); restTemplate.headForHeaders(url);
return url; return url;
} catch (RestClientException err) { } catch (RestClientException err) {}
logger.warn("Not found: {}, err: {}", url, err);
}
//Check txt contained url //Check txt contained url
url = preview.formatted(domain, map, "url"); url = preview.formatted(domain, map, "url");
try { try {
logger.info("Request: {}", url); logger.info("Request: {}", url);
return restTemplate.getForEntity(url, String.class).getBody().replace("\n", ""); return restTemplate.getForEntity(url, String.class).getBody().replace("\n", "");
} catch (RestClientException err) { } catch (RestClientException err) {}
logger.warn("Not found: {}, err: {}", url, err);
}
return null; return null;
} }

Loading…
Cancel
Save