Skip to content

Commit

Permalink
fix shindan (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiang-Red authored Jan 15, 2023
1 parent ba47b28 commit b23ce35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions setu/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"encoding/binary"
"errors"
"image"
_ "image/gif"
_ "image/jpeg"
_ "image/png"
_ "image/gif" // register decode gif
_ "image/jpeg" // register decode jpeg
_ "image/png" // register decode png
"math/rand"
"os"
"time"

_ "golang.org/x/image/webp"
_ "golang.org/x/image/webp" // register decode webp

"github.com/FloatTech/floatbox/file"
"github.com/corona10/goimagehash"
Expand Down
2 changes: 1 addition & 1 deletion shindanmaker/shindanmaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func refresh() error {
// 获取 cookie
if temp := resp.Header.Values("Set-Cookie"); len(temp) == 0 {
return errors.New("刷新 cookie 时发生错误")
} else if !strings.Contains(temp[len(temp)-1], "_session") {
} else if cookie = temp[len(temp)-1]; !strings.Contains(cookie, "_session") {
return errors.New("刷新 cookie 时发生错误")
}
// 获取 token
Expand Down

0 comments on commit b23ce35

Please sign in to comment.