Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cmd/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Use global switches to specify the set, by default it will fetch all sets.`,
furnitures := []*furniture{}

var wg sync.WaitGroup
respChannel := make(chan *http.Response)
respChannel := make(chan *http.Response, maxWorker)
writeChannel := make(chan *goquery.Selection)

biri.ProxyStart()
Expand All @@ -271,7 +271,6 @@ Use global switches to specify the set, by default it will fetch all sets.`,
}
// Default furniture
furni := furniture{
Jobs: make(chan string),
Values: values,
Wg: &wg,
Jar: jar,
Expand All @@ -292,14 +291,17 @@ Use global switches to specify the set, by default it will fetch all sets.`,
copyFurni.Jobs = make(chan string)
log.Println(furni, recentfurni)
furnitures = append(furnitures, &copyFurni)

}
} else {
furnitures = append(furnitures, &furni)

}

for _, furni := range furnitures {
loopNum += furni.getLastPage()
lastPage := furni.getLastPage()
loopNum += lastPage
furni.Jobs = make(chan string, lastPage)
}

if iter == 0 {
Expand Down