Documentation
¶
Index ¶
- Variables
- func GetTab(host string, port int) *rod.Page
- func UrlCleanup(urlIn string) (urlOut string, err error)
- func UrlDecode(urlIn string) (urlOut string)
- type IsHistorySection
- type IsHistoryVideo
- type IsPlaylist
- type IsPlaylistVideo
- type IsSubChannel
- type IsSubVideo
- type TypeConf
- type TypeFlag
- type TypeFlagHistory
- type TypeFlagPlaylist
- type TypeFlagSub
- type YT_Info
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UrlSearch = struct { Bing string Google string Kagi string StartPage string }{ Bing: "https://www.bing.com", Google: "https://www.google.com", Kagi: "https://kagi.com", StartPage: "https://www.startpage.com", } UrlYT = struct { Base string History string Playlists string SubChannels string SubVideos string }{ Base: "https://www.youtube.com", History: "https://www.youtube.com/feed/history", Playlists: "https://www.youtube.com/feed/playlists", SubChannels: "https://www.youtube.com/feed/channels", SubVideos: "https://www.youtube.com/feed/subscriptions", } )
View Source
var ConfDefault = TypeConf{
FileConf: "$HOME/.config/yt-toolbox.json",
DevtoolsHost: "localhost",
DevtoolsPort: 9222,
}
Functions ¶
func UrlCleanup ¶
Types ¶
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
}
func (*IsHistorySection) New ¶
func (t *IsHistorySection) New(page *rod.Page, urlStr string, remove bool, scrollMax int, verbose bool) *IsHistorySection
func (*IsHistorySection) Run ¶ added in v0.7.0
func (t *IsHistorySection) Run() *IsHistorySection
type IsHistoryVideo ¶
type IsHistoryVideo struct {
*is.Processor
ClickSleep float64 // in second
Del bool // false;
Deleted bool // In Run(), elements loop, current element is deleted or not
Desc bool // false;
PrintHeader bool // true;
Remove bool // false;
Standalone bool // false;
Verbose bool // false;
Filter []string
}
func (*IsHistoryVideo) New ¶
func (t *IsHistoryVideo) New(property *is.Property, del bool, remove bool, filter *[]string) *IsHistoryVideo
func (*IsHistoryVideo) Run ¶ added in v0.7.0
func (t *IsHistoryVideo) Run() *IsHistoryVideo
func (*IsHistoryVideo) V021_ElementsRemoveShorts ¶
func (t *IsHistoryVideo) V021_ElementsRemoveShorts(element *rod.Element) *IsHistoryVideo
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 ¶ added in v0.7.0
func (t *IsPlaylist) Run() *IsPlaylist
type IsPlaylistVideo ¶
func (*IsPlaylistVideo) New ¶
func (t *IsPlaylistVideo) New(page *rod.Page, urlStr string, scrollMax int) *IsPlaylistVideo
func (*IsPlaylistVideo) Run ¶ added in v0.7.0
func (t *IsPlaylistVideo) Run() *IsPlaylistVideo
type IsSubChannel ¶
func (*IsSubChannel) New ¶
func (t *IsSubChannel) New(page *rod.Page, urlStr string, scrollMax int) *IsSubChannel
func (*IsSubChannel) Run ¶ added in v0.7.0
func (t *IsSubChannel) Run() *IsSubChannel
type IsSubVideo ¶
func (*IsSubVideo) New ¶
func (t *IsSubVideo) New(page *rod.Page, urlStr string, scrollMax int, day uint) *IsSubVideo
func (*IsSubVideo) Run ¶ added in v0.7.0
func (t *IsSubVideo) Run() *IsSubVideo
type TypeConf ¶
type TypeFlag ¶
type TypeFlag struct {
Debug bool // Enable debug output
Trace bool // Enable trace output
Verbose bool
ScrollMax int
}
Holding all flags from command line
type TypeFlagHistory ¶
type TypeFlagPlaylist ¶
type TypeFlagSub ¶
type TypeFlagSub struct {
Day uint
}
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
Click to show internal directories.
Click to hide internal directories.