We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48b7ba7 commit 3390ca2Copy full SHA for 3390ca2
bin/lib/psl_faup.py
@@ -141,8 +141,10 @@ def get_host(self):
141
def get_domain(self):
142
if not self.decoded or not self._url:
143
raise UrlNotDecoded("You must call pslfaup.decode() first")
144
+ if self.ip_as_host:
145
+ return self.ip_as_host
146
- if self.host is not None and not self.ip_as_host:
147
+ if self.host is not None:
148
domain = self.host[:-(len(self.get_tld()) + 1)].rsplit('.', 1)[-1]
149
if domain:
150
return f'{domain}.{self.tld}'
0 commit comments