public static boolean isRobot(HttpServletRequest request) {
        String ua = request.getHeader("user-agent");
        if (StringUtils.isBlank(ua)) return false;
        //@formatter:off
        return (ua != null && (ua.contains("Baiduspider")
                            || ua.contains("Googlebot")
                            || ua.contains("sogou")
                            || ua.contains("sina")
                            || ua.contains("iaskspider")
                            || ua.contains("ia_archiver")
                            || ua.contains("Sosospider")
                            || ua.contains("YoudaoBot")
                            || ua.contains("yahoo")
                            || ua.contains("yodao")
                            || ua.contains("MSNBot")
                            || ua.contains("spider")
                            || ua.contains("Twiceler")
                            || ua.contains("Sosoimagespider")
                            || ua.contains("naver.com/robots")
                            || ua.contains("Nutch")
                            || ua.contains("spider")));
        //@formatter:on
    }
public static boolean isRobot(HttpServletRequest request) {
        String ua = request.getHeader("user-agent");
        if (StringUtils.isBlank(ua)) return false;
        
        return (ua != null && (ua.contains("Baiduspider")
                            || ua.contains("Googlebot")
                            || ua.contains("sogou")
                            || ua.contains("sina")
                            || ua.contains("iaskspider")
                            || ua.contains("ia_archiver")
                            || ua.contains("Sosospider")
                            || ua.contains("YoudaoBot")
                            || ua.contains("yahoo")
                            || ua.contains("yodao")
                            || ua.contains("MSNBot")
                            || ua.contains("spider")
                            || ua.contains("Twiceler")
                            || ua.contains("Sosoimagespider")
                            || ua.contains("naver.com/robots")
                            || ua.contains("Nutch")
                            || ua.contains("spider")));
        
    }
public static boolean isRobot ( HttpServletRequest request ) { String ua = request . getHeader ( "user-agent" ) ; if ( StringUtils . isBlank ( ua ) ) return false ; //@formatter:off return ( ua != null && ( ua . contains ( "Baiduspider" ) || ua . contains ( "Googlebot" ) || ua . contains ( "sogou" ) || ua . contains ( "sina" ) || ua . contains ( "iaskspider" ) || ua . contains ( "ia_archiver" ) || ua . contains ( "Sosospider" ) || ua . contains ( "YoudaoBot" ) || ua . contains ( "yahoo" ) || ua . contains ( "yodao" ) || ua . contains ( "MSNBot" ) || ua . contains ( "spider" ) || ua . contains ( "Twiceler" ) || ua . contains ( "Sosoimagespider" ) || ua . contains ( "naver.com/robots" ) || ua . contains ( "Nutch" ) || ua . contains ( "spider" ) ) ) ; //@formatter:on }
判断是否为搜索引擎
判断是否为搜索引擎