mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-20 06:20:08 +08:00
🐛 fix: image finder
This commit is contained in:
parent
8660d8d990
commit
1eefb4e610
@ -3,6 +3,7 @@ package imagefinder
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -83,5 +84,8 @@ func soutuapi(keyword string) (r resultjson, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = json.Unmarshal(data, &r)
|
err = json.Unmarshal(data, &r)
|
||||||
|
if err == nil && r.Error {
|
||||||
|
err = errors.New(r.Message)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user