Sign inSign up

easypi/tldextract

By easypi

•Updated about 8 hours ago

Accurately separates a URL's subdomain, domain, and public suffix

Image
API management
0

181

easypi/tldextract repository overview

⁠tldextract

tldextract⁠ accurately separates a URL's subdomain, domain, and public suffix, using the Public Suffix List (PSL).

⁠Server

docker compose up -d

⁠Client

# GET single
curl 'http://localhost:8000/extract?input=www.google.com'

# GET mutiple
curl 'http://localhost:8000/extract?input=www.google.com&input=g.cn'

# GET mutiple
curl -G 'http://localhost:8000/extract' \
  --data-urlencode 'input=www.google.com' \
  --data-urlencode 'input=g.cn'

# POST single
curl -X POST 'http://localhost:8000/extract' \
  --json '{"input": "www.google.com"}'

# POST mutiple
curl -X POST 'http://localhost:8000/extract' \
  --json '{"input": ["www.google.com", "g.cn"], "include_private": true}'

Tag summary

Content type

Image

Digest

sha256:61ed8f89b…

Size

24.5 MB

Last updated

about 8 hours ago

docker pull easypi/tldextract