diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-07-15 20:39:20 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-15 20:39:20 +0200 |
commit | 2dafec40f68cbf06665be0d4ba3cca23a79f3ac8 (patch) | |
tree | 47b69c1c86d024236d0f7bc751f89a36ce88185e /domain.py | |
parent | b2e4168ece2e6f378e06d3833c179299e82254fc (diff) |
Finally remove automedia.py
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] |