gobilibililogin

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: GPL-3.0 Imports: 13 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

GoBilibiliLogin

golang实现的bilibili登录

改自 login_bili_go, 适配我的其他程序, 方便复用

用法

安装
go get -u https://github.com/boxie123/GoBilibiliLogin
示例代码
package main

import (
	"fmt"
	login "github.com/boxie123/GoBilibiliLogin"
)

func main() {
	cookie, csrf, configFilePath := login.Login()

	fmt.Printf("Cookie: %s\ncsrf: %s\ncookie文件存储路径: %s\n", cookie, csrf, configFilePath)
}

可在命令行参数中传入来指定文件名,若不传入则默认bzcookie.json

Documentation

Index

Constants

View Source
const UserAgent = `` /* 131-byte string literal not displayed */

Variables

This section is empty.

Functions

func Login

func Login() (string, string, string)

Login

@Description: 自动登录 Bilibili 账号并储存 cookie 到文件
@return string cookie
@return string csrf
@return string configFilePath 登录信息文件存储路径

Types

type ConfigInfo

type ConfigInfo struct {
	AccessKey    string `json:"accessKey"`
	Cookie       string `json:"cookie"`
	RefreshToken string `json:"refresh_token"`
}

ConfigInfo 配置信息

Jump to

Keyboard shortcuts

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