Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentFetcher ¶
type ContentFetcher struct {
// contains filtered or unexported fields
}
func NewContentFetcher ¶
func NewContentFetcher() *ContentFetcher
func (*ContentFetcher) Fetch ¶
func (cf *ContentFetcher) Fetch(ctx context.Context, url string, opts FetchOptions) (*FetchResult, error)
type FetchOptions ¶
type FetchResult ¶
type SimpleFetcher ¶
type SimpleFetcher struct {
// contains filtered or unexported fields
}
func NewSimpleFetcher ¶
func NewSimpleFetcher() *SimpleFetcher
func (*SimpleFetcher) FetchStatic ¶
func (sf *SimpleFetcher) FetchStatic(ctx context.Context, url string, opts FetchOptions) (*FetchResult, error)
func (*SimpleFetcher) SetFollowRedirects ¶
func (sf *SimpleFetcher) SetFollowRedirects(follow bool)
SetFollowRedirects configures whether the fetcher follows HTTP redirects
type UserAgentSelector ¶
type UserAgentSelector struct {
// contains filtered or unexported fields
}
func NewUserAgentSelector ¶
func NewUserAgentSelector() *UserAgentSelector
func (*UserAgentSelector) GetUserAgent ¶
func (uas *UserAgentSelector) GetUserAgent(uaType string) string
GetUserAgent returns a user agent string based on the specified type If uaType is "auto" or empty, it randomly selects from all available user agents If a specific browser type is specified, it randomly selects from that browser's user agents
type UserAgentType ¶
type UserAgentType string
const ( UserAgentAuto UserAgentType = "auto" UserAgentChrome UserAgentType = "chrome" UserAgentFirefox UserAgentType = "firefox" UserAgentSafari UserAgentType = "safari" UserAgentEdge UserAgentType = "edge" )
Click to show internal directories.
Click to hide internal directories.