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

Function Ptqrshow

qzone/api.go:37–64  ·  view source on GitHub ↗

Ptqrshow 获得登录二维码

()

Source from the content-addressed store, hash-verified

35
36// Ptqrshow 获得登录二维码
37func Ptqrshow() (data []byte, qrsig string, ptqrtoken string, err error) {
38 client := &http.Client{
39 CheckRedirect: func(req *http.Request, via []*http.Request) error {
40 return http.ErrUseLastResponse
41 },
42 }
43 ptqrshowReq, err := http.NewRequest("GET", ptqrshowURL, nil)
44 if err != nil {
45 return
46 }
47 ptqrshowResp, err := client.Do(ptqrshowReq)
48 if err != nil {
49 return
50 }
51 defer ptqrshowResp.Body.Close()
52 for _, v := range ptqrshowResp.Cookies() {
53 if v.Name == "qrsig" {
54 qrsig = v.Value
55 break
56 }
57 }
58 if qrsig == "" {
59 return
60 }
61 ptqrtoken = genderGTK(qrsig, 0)
62 data, err = io.ReadAll(ptqrshowResp.Body)
63 return
64}
65
66// Ptqrlogin 登录回调
67func Ptqrlogin(qrsig string, qrtoken string) (data []byte, cookie string, err error) {

Callers 1

TestLoginFunction · 0.85

Calls 1

genderGTKFunction · 0.85

Tested by 1

TestLoginFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…