Determine if we need text or url output

def get_text_or_url(args):
    """Determine if we need text or url output"""
    redirect_mode = args.bang or args.search or args.lucky
    if redirect_mode or args.url:
        return 'url'
    else:
        return 'text'