use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_mahonie.
public void test_mahonie() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("mahonie, neofonie search:robot/search:robot/0.0.1 (This is the MIA Bot - crawling for mia research project. If you feel unhappy and do not want to be visited by our crawler send an email to spider@neofonie.de; http://spider.neofonie.de; spider@neofonie.de)");
Assert.assertEquals(1, stat.getBotCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_unkownBot1.
public void test_unkownBot1() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("Mozilla/5.0 (compatible; Mail.RU/2.0)");
Assert.assertEquals(1, stat.getBotCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_Crawler.
public void test_Crawler() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("Mozilla/5.0 (compatible; SISTRIX Crawler; http://crawler.sistrix.net/)");
Assert.assertEquals(1, stat.getBotCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_unkownBot8.
public void test_unkownBot8() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("SkimBot/1.0 (www.skimlinks.com <dev@skimlinks.com>)");
Assert.assertEquals(1, stat.getBotCount());
}
use of com.alibaba.druid.support.http.stat.WebAppStat in project druid by alibaba.
the class UserAgentBotStat method test_youdao.
public void test_youdao() throws Exception {
WebAppStat stat = new WebAppStat("");
stat.computeUserAgent("Mozilla/5.0 (compatible; YoudaoBot/1.0; http://www.youdao.com/help/webmaster/spider/; )");
Assert.assertEquals(1, stat.getBotCount());
Assert.assertEquals(1, stat.getBotYoudaoCount());
}
Aggregations