(url)
判断当前url是否为纯域名形式
    urlparse('http://www.cwi.nl:80/%7Eguido/Python.html')
    ParseResult(scheme='http', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html',params='', query='', fragment='')
判断当前url是否为纯域名形式
    urlparse('http://www.cwi.nl:80/%7Eguido/Python.html')
    ParseResult(scheme='http', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html',params='', query='', fragment='')
判断当前url是否为纯域名形式 urlparse ( http : // www . cwi . nl : 80 / %7Eguido / Python . html ) ParseResult ( scheme = http netloc = www . cwi . nl : 80 path = / %7Eguido / Python . html params = query = fragment = )
def is_netloc(url):
    '''
    判断当前url是否为纯域名形式
    urlparse('http://www.cwi.nl:80/%7Eguido/Python.html')
    ParseResult(scheme='http', netloc='www.cwi.nl:80', path='/%7Eguido/Python.html',params='', query='', fragment='')
    '''
    parse_result = urlparse.urlparse(url)
    if len(parse_result[1]) > 0 and len(parse_result[2]) <= 1 and len(parse_result[4]) == 0:
        return True
    else:
        return False
def is_netloc ( url ) : parse_result = urlparse . urlparse ( url ) if len ( parse_result [ 1 ] ) > 0 and len ( parse_result [ 2 ] ) <= 1 and len ( parse_result [ 4 ] ) == 0 : return True else : return False