Skip to content

Commit 3390ca2

Browse files
committed
fix: [psl_faup] set IP address as domain
1 parent 48b7ba7 commit 3390ca2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/lib/psl_faup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,10 @@ def get_host(self):
141141
def get_domain(self):
142142
if not self.decoded or not self._url:
143143
raise UrlNotDecoded("You must call pslfaup.decode() first")
144+
if self.ip_as_host:
145+
return self.ip_as_host
144146

145-
if self.host is not None and not self.ip_as_host:
147+
if self.host is not None:
146148
domain = self.host[:-(len(self.get_tld()) + 1)].rsplit('.', 1)[-1]
147149
if domain:
148150
return f'{domain}.{self.tld}'

0 commit comments

Comments
 (0)