We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大侠,surfer非常好,非常有用 但也遇到一个问题: 网页中的js通过setTimeout设置了4s后才运行,请问如何让停止4s以自动运行网页里面的js?
The text was updated successfully, but these errors were encountered:
在surf.go文件202行左右位置添加了time.Sleep(5 * time.Second),还是不行
surf.go
time.Sleep(5 * time.Second)
if param.TryTimes <= 0 { for { resp, err = param.client.Do(req) if err != nil { if !param.EnableCookie { l := len(UserAgents["common"]) r := rand.New(rand.NewSource(time.Now().UnixNano())) req.Header.Set("User-Agent", UserAgents["common"][r.Intn(l)]) } time.Sleep(param.RetryPause) param.renewBody() continue } time.Sleep(5 * time.Second) log.Println("成功获取网页,等待几秒钟:") break } } else { for i := 0; i < param.TryTimes; i++ { if i != 0 { time.Sleep(param.RetryPause) param.renewBody() } resp, err = param.client.Do(req) if err != nil { if !param.EnableCookie { l := len(UserAgents["common"]) r := rand.New(rand.NewSource(time.Now().UnixNano())) req.Header.Set("User-Agent", UserAgents["common"][r.Intn(l)]) } continue } log.Println("成功获取网页xxxx,等待几秒钟:", param.RetryPause) log.Println("成功获取网页xxxx,等待几秒钟:=====", resp) time.Sleep(5 * time.Second) break } }
Sorry, something went wrong.
No branches or pull requests
大侠,surfer非常好,非常有用
但也遇到一个问题:
网页中的js通过setTimeout设置了4s后才运行,请问如何让停止4s以自动运行网页里面的js?
The text was updated successfully, but these errors were encountered: