context fix
This commit is contained in:
parent
4665c90c2c
commit
c955615fb1
8 changed files with 39 additions and 52 deletions
|
|
@ -41,14 +41,7 @@ func (s *Parser) getPrice(ctx context.Context, task shared.Task) (int32, error)
|
|||
return minimal, nil
|
||||
}
|
||||
|
||||
func (s *Parser) getMinimalPrice(task shared.Task) int32 {
|
||||
ctx := context.Background()
|
||||
allocCtx, allocCancel := chromedp.NewRemoteAllocator(ctx, s.externalBrowser)
|
||||
defer allocCancel()
|
||||
|
||||
sessionCtx, sessionCancel := chromedp.NewContext(allocCtx, chromedp.WithLogf(log.Printf))
|
||||
defer sessionCancel()
|
||||
|
||||
func (s *Parser) getMinimalPrice(sessionCtx context.Context, task shared.Task) int32 {
|
||||
var (
|
||||
singlePrice string
|
||||
rangedPrice string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue