小优化
This commit is contained in:
parent
eb973a1942
commit
e876fd0823
17
main.go
17
main.go
@ -168,14 +168,17 @@ func (f *fetchHandler) handle(conn string) {
|
|||||||
}
|
}
|
||||||
for _, sourceName := range (*f.searchSource.mapX)[conn] {
|
for _, sourceName := range (*f.searchSource.mapX)[conn] {
|
||||||
source := f.sourceMap[sourceName]
|
source := f.sourceMap[sourceName]
|
||||||
r := f.fetch2(source, key)
|
go func() {
|
||||||
if r != nil && r.StatusCode == 200 {
|
r := f.fetch2(source, key)
|
||||||
if strings.ToUpper(source.Type) == "HTML" {
|
if r != nil && r.StatusCode == 200 {
|
||||||
f.parsesDom(r, conn, source)
|
if strings.ToUpper(source.Type) == "HTML" {
|
||||||
} else {
|
f.parsesDom(r, conn, source)
|
||||||
f.parseAjax(r, source, conn)
|
} else {
|
||||||
|
f.parseAjax(r, source, conn)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user