rguerreiro / device

Device type detection library based on the useragent string. Refactored from my express-device repo.
MIT License
79 stars 27 forks source link

AdsBot from Google is detected as "phone" #22

Closed muralikg closed 4 years ago

muralikg commented 7 years ago

Can you please add AdsBot also to the botlist?

"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 (compatible; AdsBot-Google-Mobile; +http://www.google.com/mobile/adsbot.html)"
muralikg commented 7 years ago

Parsing user agent string however gives model as "Spider" which is good enough.

device(bot_string_above, {parseUserAgent: true} )

// returns 
{ parser: 
   ...
  type: 'phone',
  model: 'Spider',
}
rguerreiro commented 6 years ago

Nonetheless I can add it, because in terms of performance it's preferably to just use the user-agent to check for device type

dnmahendra commented 6 years ago

The following is being detected as not a bot. This is actually a spider

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko; Google Web Preview) Chrome/41.0.2272.118 Safari/537.36