Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Andrey Andrey
At night, I found out experimentally that the regexp call coincides 99% with the appearance of this problem. But not always, so that's not the problem.
And yes, I will expand the problem in more detail
. There is golang, there is a plugin, go-curl. My goal is to parse pages
package main
import (
"fmt"
curl "github.com/andelf/go-curl"
)
func main() {
easy := curl.EasyInit()
defer easy.Cleanup()
easy.Setopt(curl.OPT_URL, "http://www.baidu.com/")
// make a callback function
fooTest := func (buf []byte, userdata interface{}) bool {
println("DEBUG: size=>", len(buf))
println("DEBUG: content=>", string(buf))
return true
}
easy.Setopt(curl.OPT_WRITEFUNCTION, fooTest)
if err := easy.Perform(); err != nil {
fmt.Printf("ERROR: %v\n", err)
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question