chrome

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package chrome Time : 2022/3/25 23:24 Author : xushiyin contact : yuqingxushiyin@gmail.com

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Str2TimeDuration

func Str2TimeDuration(str string) (time.Duration, error)

Str2TimeDuration 将字符串转换为时间长度

Types

type PlayVideo

type PlayVideo struct {
	UserId    string
	Count     int64
	VInfoList []*VideoInfo
	Log       *log.Entry
}

func NewPlayVideo

func NewPlayVideo(userId string, count int64) *PlayVideo

func (*PlayVideo) DisplayVideoInfo

func (pv *PlayVideo) DisplayVideoInfo()

func (*PlayVideo) GetVideoInfoList

func (pv *PlayVideo) GetVideoInfoList(page *rod.Page) error

GetVideoInfoList 获取视频信息列表 from https://space.bilibili.com/{uid}/video, 仅获取当前页的视频信息,单页总共30条

func (*PlayVideo) PlayVideos

func (pv *PlayVideo) PlayVideos(cmd *cobra.Command, b *rod.Browser)

func (*PlayVideo) VideoFastForward

func (pv *PlayVideo) VideoFastForward(p *rod.Page, n int)

VideoFastForward 视频快进, 方向键控制快进

type VideoInfo

type VideoInfo struct {
	Id        string
	Title     string
	ImageUrl  string
	Duration  time.Duration
	PlayCount int64
	PlayUrl   string
}

Jump to

Keyboard shortcuts

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