Documentation ¶
Index ¶
- func CrawlersList() string
- func ExclusionsList() string
- func MobilesList() string
- func PiwikCrawlersList() string
- func PiwikMobilesList() string
- func ShortCrawlersList() string
- func ShortExclusionsList() string
- func ShortMobilesList() string
- type CrawlerDetector
- func (cd *CrawlerDetector) GetMatched() []string
- func (cd *CrawlerDetector) IsCrawler(userAgent string) bool
- func (cd *CrawlerDetector) IsExclusion(userAgent string) bool
- func (cd *CrawlerDetector) IsMobile(userAgent string) bool
- func (cd *CrawlerDetector) Parse(userAgent string) *CrawlerDetector
- func (cd *CrawlerDetector) ParseUnsafe(userAgent string) *CrawlerDetector
- type Piwik
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PiwikCrawlersList ¶ added in v0.0.2
func PiwikCrawlersList() string
PiwikCrawlersList is list of crawlers/spiders/bots by Piwik
func PiwikMobilesList ¶ added in v0.0.2
func PiwikMobilesList() string
PiwikMobilesList is list of most used mobiles
func ShortCrawlersList ¶ added in v0.0.6
func ShortCrawlersList() string
ShortCrawlersList is list of crawlers/spiders/bots
func ShortExclusionsList ¶ added in v0.0.6
func ShortExclusionsList() string
ShortExclusionsList is list of exclusions
func ShortMobilesList ¶ added in v0.0.6
func ShortMobilesList() string
ShortMobilesList is a small list of most used mobiles
Types ¶
type CrawlerDetector ¶
type CrawlerDetector struct { Crawlers *regexp.Regexp Mobiles *regexp.Regexp Exclusions *regexp.Regexp Matched []string Browser bool Crawler bool Mobile bool }
CrawlerDetector is crawler detector structure
func NewPiwik ¶ added in v0.0.6
func NewPiwik() *CrawlerDetector
NewPiwik returns a new initialized CrawlerDetector from Piwik
func NewShort ¶ added in v0.0.6
func NewShort() *CrawlerDetector
NewShort returns a new basic initialized CrawlerDetector
func (*CrawlerDetector) GetMatched ¶
func (cd *CrawlerDetector) GetMatched() []string
GetMatched is getter of matched result
func (*CrawlerDetector) IsCrawler ¶
func (cd *CrawlerDetector) IsCrawler(userAgent string) bool
IsCrawler is detect crawlers/spiders/bots by user agent
func (*CrawlerDetector) IsExclusion ¶
func (cd *CrawlerDetector) IsExclusion(userAgent string) bool
IsExclusion is detect exclusion from user agent
func (*CrawlerDetector) IsMobile ¶
func (cd *CrawlerDetector) IsMobile(userAgent string) bool
IsMobile is detect mobile device by user agent
func (*CrawlerDetector) Parse ¶ added in v0.0.3
func (cd *CrawlerDetector) Parse(userAgent string) *CrawlerDetector
Parse is to perform all operations by user agent
func (*CrawlerDetector) ParseUnsafe ¶ added in v0.0.4
func (cd *CrawlerDetector) ParseUnsafe(userAgent string) *CrawlerDetector
ParseUnsafe is to perform all browser and mobile operations by user agent but if not is a browser we asume that is a crawler