antchfx/htmlquery

Add configurable timeout to LoadURL

cnp96 opened this issue · 1 comments

cnp96 commented

The LoadURL method should have a timeout parameter to avoid indefinite load time.
Optionally, it could also accept any other client parameters.

func LoadURL(url string, clientOpts ...*http.Client) (*html.Node, error) {

}

Hello, @cnp96 , Thanks for your feedback.

No any plan to change or add more feature for LoadURL method. You can implements your http client to load html document and then call Parse(reader).