if ($http_user_agent ~* ".*(Huaweisymantecspider|huaweisymantecspider|Wget|wget|robot|spideri|MJ12bot|HTTrack|crawl|Python|python|Java|java|Perl|perl|PHP|php).*") {
set $var_bad_user_agent '1';
}
if ($http_user_agent ~ "^$") {
set $var_bad_user_agnet '1';
}
if ($http_user_agent ~* ".*(BaiDu|Sougou|Google).*") {