def get_extension_id(arg):
    """
    Return the extension id from the given console argument

    :param arg: The console argument
    :return: The extension id
    """

    if arg.startswith('http://'):
        arg = arg.replace('http://', 'https://')

    if arg.startswith('https://'):
        return arg.split('/')[-1:][0]

    return arg