Skip to content

Commit

Permalink
Add section in README about changing the PSL.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lecocq committed Aug 26, 2016
1 parent 4d36209 commit aeede32
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,24 @@ Not all functions are chainable -- some return a value other than a `URL` object

- `encode(...)` -- return a version of the url in an arbitrary encoding

Public Suffix List
==================
This library comes bundled with a version of the public suffix list. However, it may not
suit your needs (whether you need to stay pinned to an old list, or need to update to a
new list). As such, you can provide the PSL you'd like to use, as a `UTF-8` string:

```python
import url

# Read it from a file
with open('path/to/my/psl') as fin:
url.set_psl(fin.read())

# Grab it from the PSL site
import requests
url.set_psl(requests.get('https://publicsuffix.org/list/public_suffix_list.dat').content)
```

Properties
==========
Many attributes are available on URL objects:
Expand Down

0 comments on commit aeede32

Please sign in to comment.