fix support for IP addresses

This commit is contained in:
Somdev Sangwan
2021-01-28 16:15:17 +05:30
committed by GitHub
parent 3415c05761
commit 2e3ea35807

View File

@@ -1,13 +1,13 @@
import os
import re
import tld
import json
import tempfile
from urllib.parse import urlparse
def host(string):
if string and '*' not in string:
return tld.get_fld(string, fix_protocol=True, fail_silently=True)
return urlparse(string).netloc
def load_json(file):