Skip to content

Latest commit

 

History

History
18 lines (9 loc) · 414 Bytes

README.md

File metadata and controls

18 lines (9 loc) · 414 Bytes

Go Crawler Detection

Tiny Go library to detect if a useragent is a bot, spider, crawler etc. Uses https://github.com/monperrus/crawler-user-agents for the data.

Usage

import github.com/samvaughton/crawlerdetection

API

  • crawlerdetection.GetCrawler(string) CrawlerPattern
  • crawlerdetection.IsCrawler(string) bool

Examples

crawlerdetection.IsCrawler("Googlebot/2.1") = true