From 2dafec40f68cbf06665be0d4ba3cca23a79f3ac8 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 15 Jul 2020 20:39:20 +0200 Subject: Finally remove automedia.py --- domain.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 domain.py (limited to 'domain.py') 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] -- cgit v1.2.3