Skip to content

Commit fcc453f

Browse files
committed
Merge pull request #21 from lencioni/patch-2
Improve bot detection regex
2 parents 9fc6b4a + 97790f7 commit fcc453f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/agent_orange/device.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Device < Base
1414
DEVICES = {
1515
:computer => 'windows|macintosh|x11|linux',
1616
:mobile => 'ipod|ipad|iphone|palm|android|opera mini|hiptop|windows ce|smartphone|mobile|treo|psp',
17-
:bot => 'bot|googlebot|crawler|spider|robot|crawling'
17+
:bot => 'alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex'
1818
}
1919

2020
def parse(user_agent)

0 commit comments

Comments
 (0)