当爬虫启动时, --read-all将会自动启用

This commit is contained in:
M09Ic committed 2023-06-30 12:20:17 +08:00
1 parent c9d255f244
commit cb42efd9ed
1 file changed
+4 -4
+4 -4
View File
@@ -90,16 +90,16 @@ func Spray() {
pkg.Distance = uint8(option.SimhashDistance)
ihttp.DefaultMaxBodySize = option.MaxBodyLength * 1024
internal.MaxCrawl = option.CrawlDepth
if option.ReadAll {
ihttp.DefaultMaxBodySize = 0
}
var runner *internal.Runner
if option.ResumeFrom != "" {
runner, err = option.PrepareRunner()
} else {
runner, err = option.PrepareRunner()
}
if option.ReadAll || runner.Crawl {
ihttp.DefaultMaxBodySize = 0
}
if err != nil {
logs.Log.Errorf(err.Error())
return