This commit is contained in:
Jens Langhammer
2018-11-14 19:14:14 +01:00
parent 8d4a14c4f4
commit 79490984d1
15 changed files with 611 additions and 1 deletions

View File

@ -0,0 +1,7 @@
"""URL-related utils"""
from urllib.parse import urlparse
def is_url_absolute(url):
"""Check if domain is absolute to prevent user from being redirect somewhere else"""
return bool(urlparse(url).netloc)