(license_url)
return LicenseInfo(None, None, license_url)
Extracts license information from the license URL

    >>> i = license_info('http://creativecommons.org/licenses/by/3.0/')
    >>> i.name
    'CC BY'
    >>> i.version
    '3.0'
    >>> i.url
    'http://creativecommons.org/licenses/by/3.0/'

    >>> ihttps = license_info('https://creativecommons.org/licenses/by/3.0/')
    >>> i.name == ihttps.name and i.version == ihttps.version
    True

    >>> iwww = license_info('http://www.creativecommons.org/licenses/by/3.0/')
    >>> i.name == iwww.name and i.version == iwww.version
    True

    >>> iwww = license_info('https://www.creativecommons.org/licenses/by/3.0/')
    >>> i.name == iwww.name and i.version == iwww.version
    True

    >>> i = license_info('http://www.creativecommons.org/licenses/publicdomain')
    >>> i.name
    'Public Domain'
    >>> i.version is None
    True

    >>> ihttps = license_info('https://www.creativecommons.org/licenses/publicdomain')
    >>> i.name == ihttps.name and i.version == ihttps.version
    True

    >>> i = license_info('http://example.com/my-own-license')
    >>> i.name is None
    True
    >>> i.version is None
    True
    >>> i.url
    'http://example.com/my-own-license'
Extracts license information from the license URL
Extracts license information from the license URL
def license_info(license_url):
    """Extracts license information from the license URL

    >>> i = license_info('http://creativecommons.org/licenses/by/3.0/')
    >>> i.name
    'CC BY'
    >>> i.version
    '3.0'
    >>> i.url
    'http://creativecommons.org/licenses/by/3.0/'

    >>> ihttps = license_info('https://creativecommons.org/licenses/by/3.0/')
    >>> i.name == ihttps.name and i.version == ihttps.version
    True

    >>> iwww = license_info('http://www.creativecommons.org/licenses/by/3.0/')
    >>> i.name == iwww.name and i.version == iwww.version
    True

    >>> iwww = license_info('https://www.creativecommons.org/licenses/by/3.0/')
    >>> i.name == iwww.name and i.version == iwww.version
    True

    >>> i = license_info('http://www.creativecommons.org/licenses/publicdomain')
    >>> i.name
    'Public Domain'
    >>> i.version is None
    True

    >>> ihttps = license_info('https://www.creativecommons.org/licenses/publicdomain')
    >>> i.name == ihttps.name and i.version == ihttps.version
    True

    >>> i = license_info('http://example.com/my-own-license')
    >>> i.name is None
    True
    >>> i.version is None
    True
    >>> i.url
    'http://example.com/my-own-license'
    """
    m = CCLICENSE.match(license_url)
    if m:
        _, name, version = m.groups()
        return LicenseInfo("CC %s" % name.upper(), version, license_url)

    m = CCPUBLICDOMAIN.match(license_url)
    if m:
        return LicenseInfo("Public Domain", None, license_url)

    return LicenseInfo(None, None, license_url)
def license_info ( license_url ) : m = CCLICENSE . match ( license_url ) if m : _ , name , version = m . groups ( ) return LicenseInfo ( "CC %s" % name . upper ( ) , version , license_url ) m = CCPUBLICDOMAIN . match ( license_url ) if m : return LicenseInfo ( "Public Domain" , None , license_url ) return LicenseInfo ( None , None , license_url )