F

package
v0.14.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoCookiesSave = errors.New("ErrNoCookiesSave")

Functions

func Btoi added in v0.5.11

func Btoi(b []byte, offset int, size int) int64

func Btoi16

func Btoi16(b []byte, offset int) int16

func Btoi32

func Btoi32(b []byte, offset int) int32

func Btoi64 added in v0.5.10

func Btoi64(b []byte, offset int) int64

func Btoui16 added in v0.5.11

func Btoui16(b []byte, offset int) uint16

func Btoui32 added in v0.5.11

func Btoui32(b []byte, offset int) uint32

func CookieCheck added in v0.5.8

func CookieCheck(key []string) (missKey []string)

cookie检查

func CookieGet added in v0.5.8

func CookieGet() []byte

func CookieSet added in v0.5.8

func CookieSet(source []byte)

func Dosign added in v0.5.8

func Dosign()

签到

func Feed_list added in v0.5.8

func Feed_list() (Uplist []struct {
	Roomid     int
	Uname      string
	Title      string
	LiveStatus int
})

func FileLoad added in v0.14.16

func FileLoad(path string) (data []byte, err error)

func GetHisStream added in v0.5.11

func GetHisStream() (Uplist []struct {
	Uname      string
	Title      string
	Roomid     int
	LiveStatus int
})

获取历史观看 直播

func GetRoomRealId added in v0.14.7

func GetRoomRealId(roomid int) int

房间实际id

func Get_cookie_by_msg()

短信登录

func Get_face_src

func Get_face_src(uid string) string

func Get_weared_medal added in v0.5.8

func Get_weared_medal(uid, upUid int) (item J.GetWearedMedal_Data)

获取当前佩戴的牌子

func Gift_list added in v0.5.8

func Gift_list() (list []struct {
	Bag_id    int
	Gift_id   int
	Gift_name string
	Gift_num  int
	Expire_at int
})

礼物列表

func HeadChe

func HeadChe(head []byte) header

func HeadGen

func HeadGen(datalenght, Opeation, Sequence int) []byte

头部生成与检查

func Heartbeat

func Heartbeat() ([]byte, int)

获取人气生成

func HelloChe

func HelloChe(r []byte) bool

func HelloGen

func HelloGen(roomid int, key string) []byte

认证生成与检查

func IsConnected added in v0.5.9

func IsConnected() bool

func Itob16

func Itob16(v int16) []byte

func Itob32

func Itob32(v int32) []byte

func Itob64 added in v0.5.10

func Itob64(v int64) []byte

整数 字节转换区 64 8字节 32 4字节 16 2字节

func KeepConnect added in v0.5.9

func KeepConnect()

func ParseHost added in v0.10.11

func ParseHost(rawURL string) string

just faster, use in right way

eg. ParseHost(`http://1.com/2`) => `1.com`

func ParseQuery added in v0.10.11

func ParseQuery(rawURL, key string) string

just faster, use in right way

eg. ParseQuery(`http://1.com/2?workspace=1`, "workspace=") => `1`

func ResolveReferenceLast added in v0.10.11

func ResolveReferenceLast(rawURL, ref string) string

just faster, use in right way

eg. ResolveReferenceLast(`http://1.com/2`, `1`) => `http://1.com/1`

func RoomEntryAction added in v0.5.11

func RoomEntryAction(roomId int)

进入房间

Types

type BiliApiInter added in v0.14.12

type BiliApiInter interface {
	SetReqPool(pool *pool.Buf[reqf.Req])
	SetProxy(proxy string)
	SetLocation(secOfTimeZone int) // east positive
	SetCookies(cookies []*http.Cookie)
	GetCookies() (cookies []*http.Cookie)
	GetCookie(name string) (error, string)

	LikeReport(hitCount, uid, roomid, upUid int) (err error)
	LoginQrCode() (err error, imgUrl string, QrcodeKey string)
	LoginQrPoll(QrcodeKey string) (err error, code int)
	GetOtherCookies() (err error)
	GetLiveBuvid(Roomid int) (err error)
	GetRoomBaseInfo(Roomid int) (err error, res struct {
		UpUid         int
		Uname         string
		ParentAreaID  int
		AreaID        int
		Title         string
		LiveStartTime time.Time
		Liveing       bool
		RoomID        int
	})
	GetInfoByRoom(Roomid int) (err error, res struct {
		UpUid         int
		Uname         string
		ParentAreaID  int
		AreaID        int
		Title         string
		LiveStartTime time.Time
		Liveing       bool
		RoomID        int
		GuardNum      int
		Note          string
		Locked        bool
	})
	GetRoomPlayInfo(Roomid int, Qn int) (err error, res struct {
		UpUid         int
		RoomID        int
		LiveStartTime time.Time
		Liveing       bool
		Streams       []struct {
			ProtocolName string
			Format       []struct {
				FormatName string
				Codec      []struct {
					CodecName string
					CurrentQn int
					AcceptQn  []int
					BaseURL   string
					URLInfo   []struct {
						Host      string
						Extra     string
						StreamTTL int
					}
					HdrQn     any
					DolbyType int
					AttrName  string
				}
			}
		}
	})
	GetDanmuInfo(Roomid int) (err error, res struct {
		Token string
		WSURL []string
	})
	GetDanmuMedalAnchorInfo(uid string, Roomid int) (err error, rface string)
	GetPopularAnchorRank(uid, upUid, roomid int) (err error, note string)
	GetGuardNum(upUid, roomid int) (err error, GuardNum int)
	GetNav() (err error, res struct {
		IsLogin bool
		WbiImg  struct {
			ImgURL string
			SubURL string
		}
	})
	Wbi(query string, WbiImg struct {
		ImgURL string
		SubURL string
	}) (err error, queryEnc string)
	GetWearedMedal(uid, upUid int) (err error, res struct {
		TodayIntimacy int
		RoomID        int
		TargetID      int
	})
	GetFansMedal(RoomID, TargetID int) (err error, res []struct {
		TodayFeed    int
		TargetID     int
		IsLighted    int
		MedalID      int
		RoomID       int
		LivingStatus int
	})
	SetFansMedal(medalId int) (err error)
	GetWebGetSignInfo() (err error, Status int)
	DoSign() (err error, HadSignDays int)
	GetBagList(Roomid int) (err error, res []struct {
		Bag_id    int
		Gift_id   int
		Gift_name string
		Gift_num  int
		Expire_at int
	})
	GetWalletStatus() (err error, res struct {
		Silver          int
		Silver2CoinLeft int
	})
	GetWalletRule() (err error, Silver2CoinPrice int)
	Silver2coin() (err error, Message string)
	GetHisStream() (err error, res []struct {
		Uname      string
		Title      string
		Roomid     int
		LiveStatus int
	})
	RoomEntryAction(Roomid int) (err error)
	GetOnlineGoldRank(upUid, roomid int) (err error, OnlineNum int)
	GetFollowing() (err error, res []struct {
		Roomid     int
		Uname      string
		Title      string
		LiveStatus int
	})
	IsConnected() (err error)
	GetHisDanmu(Roomid int) (err error, res []string)
	SearchUP(s string) (err error, res []struct {
		Roomid  int
		Uname   string
		Is_live bool
	})
	LiveHtml(Roomid int) (err error, res struct {
		RoomInitRes struct {
			Code    int
			Message string
			TTL     int
			Data    struct {
				RoomID      int
				UID         int
				LiveStatus  int
				LiveTime    int
				PlayurlInfo struct {
					ConfJSON string
					Playurl  struct {
						Stream []struct {
							ProtocolName string
							Format       []struct {
								FormatName string
								Codec      []struct {
									CodecName string
									CurrentQn int
									AcceptQn  []int
									BaseURL   string
									URLInfo   []struct {
										Host      string
										Extra     string
										StreamTTL int
									}
									HdrQn     any
									DolbyType int
									AttrName  string
								}
							}
						}
					}
				}
			}
		}
		RoomInfoRes struct {
			Code    int
			Message string
			TTL     int
			Data    struct {
				RoomInfo struct {
					Title        string
					LockStatus   int
					AreaID       int
					ParentAreaID int
				}
				AnchorInfo struct {
					BaseInfo struct {
						Uname string
					}
				}
				PopularRankInfo struct {
					Rank     int
					RankName string
				}
				GuardInfo struct {
					Count int
				}
			}
		}
	})
}

func GetBiliApi added in v0.14.12

func GetBiliApi() BiliApiInter

type GetFunc added in v0.5.10

type GetFunc struct {
	*c.Common
	// contains filtered or unexported fields
}

func Get added in v0.5.8

func Get(c *c.Common) *GetFunc

func (*GetFunc) CheckSwitch_FansMedal added in v0.5.10

func (t *GetFunc) CheckSwitch_FansMedal() (missKey []string)

func (*GetFunc) Get added in v0.5.10

func (t *GetFunc) Get(key string)

func (*GetFunc) GetUid added in v0.5.10

func (t *GetFunc) GetUid() (missKey []string)

func (*GetFunc) Get_LIVE_BUVID added in v0.5.10

func (t *GetFunc) Get_LIVE_BUVID() (missKey []string)

LIVE_BUVID

func (t *GetFunc) Get_cookie() (missKey []string)

扫码登录

func (*GetFunc) Get_guardNum added in v0.5.10

func (t *GetFunc) Get_guardNum() (missKey []string)

func (*GetFunc) Html added in v0.5.10

func (t *GetFunc) Html() (missKey []string)

func (*GetFunc) SearchUP added in v0.9.0

func (t *GetFunc) SearchUP(s string) (list []struct {
	Roomid  int
	Uname   string
	Is_live bool
})

func (*GetFunc) Silver_2_coin added in v0.5.10

func (t *GetFunc) Silver_2_coin() (missKey []string)

银瓜子2硬币

type UpItem added in v0.5.8

type UpItem struct {
	Uname      string `json:"uname"`
	Title      string `json:"title"`
	Roomid     int    `json:"roomid"`
	LiveStatus int    `json:"live_status"`
}

正在直播主播

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL