crawlerdetect

package
v0.0.0-...-53f744f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() *Builder

func (*Builder) AddUserAgent

func (b *Builder) AddUserAgent(userAgents map[string][]string) *Builder

AddUserAgent 添加 user-agent 映射 例如:

map[string][]string{
	crawlerdetect.Baidu: []string{"NewBaiduUserAgent"},
	crawlerdetect.Bing: []string{"NewBingUserAgent"},
}

func (*Builder) Build

func (b *Builder) Build() gin.HandlerFunc

func (*Builder) RemoveUserAgent

func (b *Builder) RemoveUserAgent(userAgents ...string) *Builder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL