diff --git a/code/libraries/geo-ip/src/main/java/nu/marginalia/geoip/sources/IP2LocationMapping.java b/code/libraries/geo-ip/src/main/java/nu/marginalia/geoip/sources/IP2LocationMapping.java index 90dd1991..9a319643 100644 --- a/code/libraries/geo-ip/src/main/java/nu/marginalia/geoip/sources/IP2LocationMapping.java +++ b/code/libraries/geo-ip/src/main/java/nu/marginalia/geoip/sources/IP2LocationMapping.java @@ -1,6 +1,8 @@ package nu.marginalia.geoip.sources; import com.opencsv.CSVReader; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.net.InetAddress; import java.nio.file.Files; @@ -9,6 +11,7 @@ import java.nio.file.Path; /** Load an IP2LOCATION LITE database file and provide a method to look up the country for an IP address. */ public class IP2LocationMapping { + private static final Logger logger = LoggerFactory.getLogger(IP2LocationMapping.class); private final IpRangeMapping ranges = new IpRangeMapping<>(); public IP2LocationMapping(Path filename) { @@ -22,7 +25,7 @@ public class IP2LocationMapping { ranges.add(Integer.parseUnsignedInt(vals[0]), Integer.parseUnsignedInt(vals[1]), vals[2]); } } catch (Exception e) { - throw new RuntimeException(e); + logger.info("Failed to load IP2Location database " + filename, e); } } diff --git a/code/processes/converting-process/src/main/java/nu/marginalia/converting/processor/DomainProcessor.java b/code/processes/converting-process/src/main/java/nu/marginalia/converting/processor/DomainProcessor.java index d12d27f8..6e993a24 100644 --- a/code/processes/converting-process/src/main/java/nu/marginalia/converting/processor/DomainProcessor.java +++ b/code/processes/converting-process/src/main/java/nu/marginalia/converting/processor/DomainProcessor.java @@ -199,9 +199,6 @@ public class DomainProcessor { if (org.contains("ALIBABA")) { return true; } - if (org.contains("CLOUDFLARE")) { - return true; - } return false; }