mirror of
https://github.com/Harry-zklcdc/go-proxy-bingai.git
synced 2024-05-03 14:25:13 +08:00
[Fix] 🐛 BingAPI Init nil Pointer #406
This commit is contained in:
parent
cfd8d3b1bf
commit
c29d6b35b3
@ -23,11 +23,13 @@ func init() {
|
||||
common.Logger.Info("APIKEY: %s", apikey)
|
||||
}
|
||||
go func() {
|
||||
globalChat = binglib.NewChat("").SetBingBaseUrl("http://localhost:" + common.PORT).SetSydneyBaseUrl("ws://localhost:" + common.PORT).SetBypassServer(common.BypassServer)
|
||||
globalImage = binglib.NewImage("").SetBingBaseUrl("http://localhost:" + common.PORT).SetBypassServer(common.BypassServer)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
t, _ := getCookie("", "", "")
|
||||
common.Logger.Info("BingAPI Ready!")
|
||||
globalChat = binglib.NewChat(t).SetBingBaseUrl("http://localhost:" + common.PORT).SetSydneyBaseUrl("ws://localhost:" + common.PORT).SetBypassServer(common.BypassServer)
|
||||
globalImage = binglib.NewImage(t).SetBingBaseUrl("http://localhost:" + common.PORT).SetBypassServer(common.BypassServer)
|
||||
globalChat.SetCookies(t)
|
||||
globalImage.SetCookies(t)
|
||||
}()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user