@@ -19,7 +19,7 @@ import (
19
19
"github.com/wdvxdr1123/ZeroBot/utils/helper"
20
20
21
21
"github.com/FloatTech/ZeroBot-Plugin/control"
22
- "github.com/FloatTech/ZeroBot-Plugin/utils/encode "
22
+ ub "github.com/FloatTech/ZeroBot-Plugin/utils/binary "
23
23
)
24
24
25
25
const (
@@ -130,12 +130,12 @@ func login(username, password string) {
130
130
client := & http.Client {
131
131
Jar : gCurCookieJar ,
132
132
}
133
- usernameData , err := encode . Utf8ToGbk (helper .StringToBytes (username ))
133
+ usernameData , err := ub . UTF82GBK (helper .StringToBytes (username ))
134
134
if err != nil {
135
135
log .Errorln ("[novel]" , err )
136
136
}
137
137
usernameGbk := helper .BytesToString (usernameData )
138
- passwordData , err := encode . Utf8ToGbk (helper .StringToBytes (password ))
138
+ passwordData , err := ub . UTF82GBK (helper .StringToBytes (password ))
139
139
if err != nil {
140
140
log .Errorln ("[novel]" , err )
141
141
}
@@ -154,7 +154,7 @@ func login(username, password string) {
154
154
}
155
155
156
156
func search (searchKey string ) (searchHtml string ) {
157
- searchKeyData , err := encode . Utf8ToGbk (helper .StringToBytes (searchKey ))
157
+ searchKeyData , err := ub . UTF82GBK (helper .StringToBytes (searchKey ))
158
158
if err != nil {
159
159
log .Errorln ("[novel]" , err )
160
160
}
@@ -177,7 +177,7 @@ func search(searchKey string) (searchHtml string) {
177
177
if err != nil {
178
178
log .Errorf ("[novel] get response for url=%s got error=%s\n " , searchURL , err .Error ())
179
179
}
180
- searchData , err = encode . GbkToUtf8 (searchData )
180
+ searchData , err = ub . GBK2UTF8 (searchData )
181
181
if err != nil {
182
182
log .Errorln ("[novel]" , err )
183
183
}
0 commit comments