domain_utils

https://img.shields.io/pypi/v/domain_utils.svg https://img.shields.io/travis/mozilla/domain_utils.svg Documentation Status

A collection of util functions for extracting domains from urls.

Repo: https://github.com/mozilla/domain_utils

Install:

pip install domain_utils

Use:

import domain_utils as du
# Return just the url `my.domain.cloudfront.net/a/path/to/a/file.html`
du.get_stripped_url('https://my.domain.cloudfront.net/a/path/to/a/file.html?a=1')
# Return just the eTLD+1 `domain.cloudfront.net`
du.get_stripped_url('https://my.domain.cloudfront.net/a/path/to/a/file.html?a=1')

This package was originally extracted from openwpm-utils.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.4.0 (2020-03-25)

  • Remove py27 support

0.3.0 (2020-03-25)

  • Restore py27 support.
  • Last version with py27 support.
  • Remove tox

0.2.0 (2020-03-24)