From 76db3f72cd7697cc4490fd521e0e9fb04de830cf Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 26 Nov 2020 06:37:11 +0100 Subject: [PATCH] Improved code. --- .../statoolinfos/crawl/CrawlCache.java | 23 +++++++++++++++++++ .../devinsy/statoolinfos/crawl/Crawler.java | 1 - 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java b/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java index b08762d..01c9f7f 100644 --- a/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java +++ b/src/fr/devinsy/statoolinfos/crawl/CrawlCache.java @@ -323,6 +323,29 @@ public class CrawlCache return result; } + /** + * @param url + * @return + * @throws IOException + */ + public PathProperties restoreToProperties(final URL url) throws IOException + { + PathProperties result; + + if (url == null) + { + result = new PathPropertyList(); + } + else + { + File file = buildFile(url.toString()); + result = PathPropertyUtils.load(file); + } + + // + return result; + } + /** * Store. * diff --git a/src/fr/devinsy/statoolinfos/crawl/Crawler.java b/src/fr/devinsy/statoolinfos/crawl/Crawler.java index e819421..b44c5eb 100644 --- a/src/fr/devinsy/statoolinfos/crawl/Crawler.java +++ b/src/fr/devinsy/statoolinfos/crawl/Crawler.java @@ -150,7 +150,6 @@ public class Crawler { try { - logger.info("Crawling " + url); // Crawl.