Skip to content

Commit

Permalink
update scrape
Browse files Browse the repository at this point in the history
  • Loading branch information
godcong committed Oct 11, 2019
1 parent 5f21a68 commit 5dc7672
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scrape.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package scrape

import (
"encoding/json"
"fmt"
"io"
"os"
"path/filepath"
Expand Down Expand Up @@ -76,10 +77,14 @@ func (impl *scrapeImpl) Find(name string) (msg *[]*Content, e error) {
}
e = iGrab.Decode(msg)
if e != nil {
log.With("name", grab.Name(), "find", name).Error(e)
log.With("name", grab.Name(), "decode", name).Error(e)
}
}

if len(*msg) == 0 {
return nil, fmt.Errorf("[%s] not found", name)
}

if impl.cache != nil {
e := imageCache(impl.cache, *msg)
if e != nil {
Expand Down

0 comments on commit 5dc7672

Please sign in to comment.