MCPcopy Create free account
hub / github.com/FloatTech/AnimeAPI / Load

Method Load

bilibili/types.go:404–421  ·  view source on GitHub ↗

Load ...

()

Source from the content-addressed store, hash-verified

402
403// Load ...
404func (cfg *CookieConfig) Load() (cookie string, err error) {
405 if cfg.BilibiliCookie != "" {
406 cookie = cfg.BilibiliCookie
407 return
408 }
409 if file.IsNotExist(cfg.file) {
410 err = errors.New("no cookie config")
411 return
412 }
413 reader, err := os.Open(cfg.file)
414 if err != nil {
415 return
416 }
417 defer reader.Close()
418 err = json.NewDecoder(reader).Decode(cfg)
419 cookie = cfg.BilibiliCookie
420 return
421}
422
423// Save ...
424func (cfg *CookieConfig) Save() (err error) {

Callers 4

SearchUserFunction · 0.80
GetDynamicDetailFunction · 0.80
GetMedalWallFunction · 0.80
getWbiKeysCachedFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected