From 751c1f14ce879cb0a2c3587eae65d8753005d5fa Mon Sep 17 00:00:00 2001 From: bit4woo Date: Mon, 15 Apr 2024 12:40:20 +0800 Subject: [PATCH] Update SearchResultEntry.java --- src/InternetSearch/SearchResultEntry.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/InternetSearch/SearchResultEntry.java b/src/InternetSearch/SearchResultEntry.java index d545ea98..15c0106f 100644 --- a/src/InternetSearch/SearchResultEntry.java +++ b/src/InternetSearch/SearchResultEntry.java @@ -73,6 +73,12 @@ public void setHost(String host) { if (StringUtils.isEmpty(this.host)) { this.host = host; } + + if (StringUtils.isEmpty(rootDomain)) { + if(DomainNameUtils.isValidDomain(host)) { + rootDomain = DomainNameUtils.getRootDomain(host); + } + } } public String getProtocol() {