Documentation ¶
Index ¶
Constants ¶
View Source
const ( Baidu = "baidu" Bing = "bing" Google = "google" Sogou = "sogou" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaiduStrategy ¶
type BaiduStrategy struct {
*UniversalStrategy
}
func NewBaiduStrategy ¶
func NewBaiduStrategy() *BaiduStrategy
type BingStrategy ¶
type BingStrategy struct {
*UniversalStrategy
}
func NewBingStrategy ¶
func NewBingStrategy() *BingStrategy
type GoogleStrategy ¶
type GoogleStrategy struct {
*UniversalStrategy
}
func NewGoogleStrategy ¶
func NewGoogleStrategy() *GoogleStrategy
type SoGouStrategy ¶
type SoGouStrategy struct {
Hosts []string
}
func NewSoGouStrategy ¶
func NewSoGouStrategy() *SoGouStrategy
func (*SoGouStrategy) CheckCrawler ¶
func (s *SoGouStrategy) CheckCrawler(ip string) (bool, error)
type Strategy ¶
func NewCrawlerDetector ¶
type UniversalStrategy ¶
type UniversalStrategy struct {
Hosts []string
}
func NewUniversalStrategy ¶
func NewUniversalStrategy(hosts []string) *UniversalStrategy
func (*UniversalStrategy) CheckCrawler ¶
func (s *UniversalStrategy) CheckCrawler(ip string) (bool, error)
Click to show internal directories.
Click to hide internal directories.