diff options
Diffstat (limited to 'domain.py')
-rwxr-xr-x | domain.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/domain.py b/domain.py deleted file mode 100755 index 0ec8ac7..0000000 --- a/domain.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python3 - -def url_extract_domain(url): - index = 0 - if url.startswith("http://"): - index += 7 - elif url.startswith("https://"): - index += 8 - - if url.startswith("www.", index): - index += 4 - - end = url.find(".", index) - if end == -1: - return url[index:] - else: - return url[index:end] |