aboutsummaryrefslogtreecommitdiff
path: root/domain.py
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-15 20:39:20 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-15 20:39:20 +0200
commit2dafec40f68cbf06665be0d4ba3cca23a79f3ac8 (patch)
tree47b69c1c86d024236d0f7bc751f89a36ce88185e /domain.py
parentb2e4168ece2e6f378e06d3833c179299e82254fc (diff)
Finally remove automedia.py
Diffstat (limited to 'domain.py')
-rwxr-xr-xdomain.py17
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]