You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-1Lines changed: 59 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ If the binary wheel is not available for your platform, then you will need a C++
16
16
17
17
First, you need to import classes:
18
18
```python
19
-
from upa_url importURL, URLSearchParams
19
+
from upa_url importPSL, URL, URLSearchParams
20
20
```
21
21
22
22
### URL class
@@ -128,6 +128,64 @@ There are functions to manipulate search parameters:
128
128
print(params) # a=3&b=2&c=1
129
129
```
130
130
131
+
### PSL class
132
+
133
+
The PSL class allows getting the [public suffix](https://url.spec.whatwg.org/#host-public-suffix) and [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain) of a given host.
134
+
135
+
First, you need to create a PSL object and load the [Public Suffix List](https://publicsuffix.org/). This list can be downloaded from https://publicsuffix.org/list/public_suffix_list.dat. The downloaded file can be loaded using one of the following methods:
The following examples show how to get a [public suffix](https://url.spec.whatwg.org/#host-public-suffix) and a [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain):
0 commit comments