lib

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YT_Base        = "https://www.youtube.com"
	YT_History     = "https://www.youtube.com/feed/history"
	YT_Playlists   = "https://www.youtube.com/feed/playlists"
	YT_SubChannels = "https://www.youtube.com/feed/channels"
	YT_SubVideos   = "https://www.youtube.com/feed/subscriptions"
)

Variables

This section is empty.

Functions

func GetTab

func GetTab(host string, port int) (page *rod.Page)

func TraceElement added in v2.0.1

func TraceElement(prefix, tag string, e *rod.Element)

log at trace level, format element html

func UrlDecode

func UrlDecode(urlIn string) (urlOut string)

func YT_FullUrl added in v2.0.2

func YT_FullUrl(urlIn string) (urlOut string)

Add YT base if missing, unescape query path

Types

type IsHistoryEntry

type IsHistoryEntry struct {
	is.Processor

	ClickSleep float64 // in second
	Del        bool    // delete entry from history
	Deleted    bool    // In Run(), elements loop, current element is deleted or not
	Desc       bool    // false;
	Remove     bool    // remove entry from screen
	Standalone bool    // false;
	Verbose    bool    // false;
	Filter     []string
	// contains filtered or unexported fields
}

process YT history by entry

func (*IsHistoryEntry) New

func (t *IsHistoryEntry) New(property *is.Property, del bool, remove bool, filter *[]string, verbose bool) *IsHistoryEntry

func (*IsHistoryEntry) Print added in v2.0.5

func (t *IsHistoryEntry) Print() *IsHistoryEntry

func (*IsHistoryEntry) Run

func (t *IsHistoryEntry) Run() *IsHistoryEntry

func (*IsHistoryEntry) V021_ElementsRemoveShorts

func (t *IsHistoryEntry) V021_ElementsRemoveShorts(element *rod.Element) *IsHistoryEntry

func (*IsHistoryEntry) V051_FuncPre added in v2.0.2

func (t *IsHistoryEntry) V051_FuncPre() *state.State[V050_StateData]

sleep between min and max ms before each state

func (*IsHistoryEntry) V051_OnErrFunc added in v2.0.3

func (t *IsHistoryEntry) V051_OnErrFunc() *state.State[V050_StateData]

func (*IsHistoryEntry) V0511_WaitStable added in v2.0.1

func (t *IsHistoryEntry) V0511_WaitStable() *state.State[V050_StateData]

func (*IsHistoryEntry) V0512_3DotClick added in v2.0.1

func (t *IsHistoryEntry) V0512_3DotClick() *state.State[V050_StateData]

Click the 3-dot button to open popup menu

func (*IsHistoryEntry) V0513_MenuSelect added in v2.0.1

func (t *IsHistoryEntry) V0513_MenuSelect() *state.State[V050_StateData]

Select the popup menu

func (*IsHistoryEntry) V0514_MenuRead added in v2.0.1

func (t *IsHistoryEntry) V0514_MenuRead() *state.State[V050_StateData]

Read menu items

func (*IsHistoryEntry) V0515_MenuClick added in v2.0.1

func (t *IsHistoryEntry) V0515_MenuClick() *state.State[V050_StateData]

Click the item, use t.state.Element from V0513

type IsHistorySection

type IsHistorySection struct {
	*is.Processor

	Del         bool // false;
	Deleted     bool // false;
	Desc        bool // false;
	PrintHeader bool // true;
	Remove      bool // false;
	Standalone  bool // false;
	Verbose     bool // false;
	Filter      []string
}

Process YT History by sections

func (*IsHistorySection) New

func (t *IsHistorySection) New(page *rod.Page, urlStr string, remove bool, scrollMax int, verbose bool) *IsHistorySection

func (*IsHistorySection) Run

type IsPlaylist

type IsPlaylist struct {
	*is.Processor

	Exclude *[]string `json:"Exclude"`
	Include *[]string `json:"Include"`
}

func (*IsPlaylist) New

func (t *IsPlaylist) New(page *rod.Page, urlStr string, scrollMax int, exclude *[]string, include *[]string) *IsPlaylist

func (*IsPlaylist) Run

func (t *IsPlaylist) Run() *IsPlaylist

type IsPlaylistVideo

type IsPlaylistVideo struct {
	*is.Processor
}

func (*IsPlaylistVideo) New

func (t *IsPlaylistVideo) New(page *rod.Page, urlStr string, scrollMax int) *IsPlaylistVideo

func (*IsPlaylistVideo) Run

func (t *IsPlaylistVideo) Run() *IsPlaylistVideo

type IsSubChannel

type IsSubChannel struct {
	*is.Processor
}

func (*IsSubChannel) New

func (t *IsSubChannel) New(page *rod.Page, urlStr string, scrollMax int) *IsSubChannel

func (*IsSubChannel) Run

func (t *IsSubChannel) Run() *IsSubChannel

type IsSubVideo

type IsSubVideo struct {
	*is.Processor
	Day uint
}

func (*IsSubVideo) New

func (t *IsSubVideo) New(page *rod.Page, urlStr string, scrollMax int, day uint) *IsSubVideo

func (*IsSubVideo) Run

func (t *IsSubVideo) Run() *IsSubVideo

type V050_StateData added in v2.0.2

type V050_StateData struct {
	Element  *rod.Element
	SleepMax int64
	SleepMin int64
}

type YT_Info

type YT_Info struct {
	is.InfoBase

	// --- Channel info
	ChName     string `json:"ChName,omitempty"`
	ChUrl      string `json:"ChUrl,omitempty"`
	ChUrlShort string `json:"ChUrlShort,omitempty"`

	// --- Video info
	Text   string   `json:"Text,omitempty"`
	Title  string   `json:"Title,omitempty"`
	Titles []string `json:"Titles,omitempty"`
	Url    string   `json:"Url,omitempty"`
}

Embed is.InfoBase for is.IInfo interface

func (*YT_Info) String

func (t *YT_Info) String() string

Jump to

Keyboard shortcuts

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