Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultUserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
Variables ¶
This section is empty.
Functions ¶
func SetMaxConcurrency ¶
func SetMaxConcurrency(n int)
Types ¶
type FetchError ¶
func (*FetchError) Error ¶
func (e *FetchError) Error() string
type FetchOption ¶
type FetchResult ¶
type FetchResult struct {
Href string
FinalURL string
Markdown string
Title string
Author string
PublishedAt string
Excerpt string
Status int
}
func Fetch ¶
func Fetch(ctx context.Context, href string, timeout time.Duration, opt *FetchOption) (*FetchResult, error)
func FetchWS ¶
func FetchWS(ctx context.Context, controlURL, href string, timeout time.Duration, opt *FetchOption) (*FetchResult, error)
Click to show internal directories.
Click to hide internal directories.