@@ -109,7 +109,7 @@ class ExtractResult:
109
109
110
110
@property
111
111
def fqdn (self ) -> str :
112
- """Returns a Fully Qualified Domain Name (FQDN), if there is a proper `domain` and `suffix`, or else the empty string.
112
+ """The Fully Qualified Domain Name (FQDN), if there is a proper `domain` and `suffix`, or else the empty string.
113
113
114
114
>>> extract("http://forums.bbc.co.uk/path/to/file").fqdn
115
115
'forums.bbc.co.uk'
@@ -122,7 +122,7 @@ def fqdn(self) -> str:
122
122
123
123
@property
124
124
def ipv4 (self ) -> str :
125
- """Returns the IPv4, if that is what the input domain/URL was, or else the empty string.
125
+ """The IPv4 address , if that is what the input domain/URL was, or else the empty string.
126
126
127
127
>>> extract("http://127.0.0.1/path/to/file").ipv4
128
128
'127.0.0.1'
@@ -141,7 +141,7 @@ def ipv4(self) -> str:
141
141
142
142
@property
143
143
def ipv6 (self ) -> str :
144
- """Returns the IPv6, if that is what the input domain/URL was, or else the empty string.
144
+ """The IPv6 address , if that is what the input domain/URL was, or else the empty string.
145
145
146
146
>>> extract(
147
147
... "http://[aBcD:ef01:2345:6789:aBcD:ef01:127.0.0.1]/path/to/file"
@@ -168,7 +168,7 @@ def ipv6(self) -> str:
168
168
169
169
@property
170
170
def registered_domain (self ) -> str :
171
- """Joins the `domain` and `suffix` fields with a dot, if they're both set, or else the empty string.
171
+ """The `domain` and `suffix` fields joined with a dot, if they're both set, or else the empty string.
172
172
173
173
>>> extract("http://forums.bbc.co.uk").registered_domain
174
174
'bbc.co.uk'
@@ -207,11 +207,17 @@ def registered_domain(self) -> str:
207
207
208
208
@property
209
209
def reverse_domain_name (self ) -> str :
210
- """Return the Reverse Domain Name Notation.
210
+ """The domain name in Reverse Domain Name Notation.
211
211
212
- Applies a reverse domain name notation to the submitted domain, in which the
213
- registered domain is used as the leftmost component. Reverse Domain Name
214
- Notation is typically used to organize namespaces for packages and plugins.
212
+ Joins extracted components of the input URL in reverse domain name
213
+ notation. The suffix is used as the leftmost component, followed by the
214
+ domain, then followed by the subdomain with its parts reversed.
215
+
216
+ Reverse Domain Name Notation is typically used to organize namespaces
217
+ for packages and plugins. Technically, a full reversal would reverse
218
+ the parts of the suffix, e.g. "co.uk" would become "uk.co", but this is
219
+ not done in practice when Reverse Domain Name Notation is called for.
220
+ So this property leaves the `suffix` part in its original order.
215
221
216
222
>>> extract("login.example.com").reverse_domain_name
217
223
'com.example.login'
@@ -226,7 +232,7 @@ def reverse_domain_name(self) -> str:
226
232
227
233
@property
228
234
def top_domain_under_registry_suffix (self ) -> str :
229
- """Joins the rightmost domain and `registry_suffix` with a dot, if such a domain is available and `registry_suffix` is set, or else the empty string.
235
+ """The rightmost domain and `registry_suffix` joined with a dot, if such a domain is available and `registry_suffix` is set, or else the empty string.
230
236
231
237
If the input was not in the Public Suffix List's private domains, this
232
238
is equivalent to `top_domain_under_public_suffix`.
@@ -251,7 +257,7 @@ def top_domain_under_registry_suffix(self) -> str:
251
257
252
258
@property
253
259
def top_domain_under_public_suffix (self ) -> str :
254
- """Joins the `domain` and `suffix` fields with a dot, if they're both set, or else the empty string.
260
+ """The `domain` and `suffix` fields joined with a dot, if they're both set, or else the empty string.
255
261
256
262
>>> extract("http://forums.bbc.co.uk").top_domain_under_public_suffix
257
263
'bbc.co.uk'
@@ -490,9 +496,9 @@ def update(
490
496
491
497
@property
492
498
def tlds (self , session : requests .Session | None = None ) -> list [str ]:
493
- """Returns the list of tld's used by default.
499
+ """The list of TLDs used by default.
494
500
495
- This will vary based on `include_psl_private_domains` and `extra_suffixes`
501
+ This will vary based on `include_psl_private_domains` and `extra_suffixes`.
496
502
"""
497
503
return list (self ._get_tld_extractor (session = session ).tlds ())
498
504
0 commit comments