search

package
v0.0.0-...-7565d26 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchChannel

type SearchChannel struct {
	ChannelID    string
	Username     string
	NewChannelID string
	Avatars      []scraper.YoutubeImage

	BioSnippet  string
	Subscribers int // e.g. "2.04M subscribers"

	IsVerified, IsVerifiedAuthor bool
}

type SearchEntry

type SearchEntry struct {
	Type  SearchEntryType
	Entry any
}

type SearchEntryType

type SearchEntryType = int
const (
	SearchEntryTypeVideo SearchEntryType = iota
	SearchEntryTypeChannel
	SearchEntryTypePlaylist
)

type SearchPlaylist

type SearchPlaylist struct {
	PlaylistID   string
	Username     string
	NewChannelID string
	Thumbnails   []scraper.YoutubeImage

	VideoCount int
	Title      string
}

type SearchScraper

type SearchScraper struct {
	// contains filtered or unexported fields
}

func NewSearchScraper

func NewSearchScraper(query string, filter string) (s SearchScraper, err error)

Feel free to leave filter option as empty

func SearchScraperFromExport

func SearchScraperFromExport(export SearchScraperExport) (s SearchScraper, err error)

func (*SearchScraper) ApplyChipFilter

func (s *SearchScraper) ApplyChipFilter(filterName string) (err error)

chips will become available after first page

func (*SearchScraper) ApplyFilter

func (s *SearchScraper) ApplyFilter(filterName string) (err error)

filters will become available after first page

func (SearchScraper) Export

func (*SearchScraper) GetChipFilters

func (s *SearchScraper) GetChipFilters() (filters []string)

returns chip filter options that can be applied, chips will become available after first page

func (*SearchScraper) GetFilters

func (s *SearchScraper) GetFilters() (filters []string)

filters will become available after first page

func (*SearchScraper) NextPage

func (s *SearchScraper) NextPage() (searchEntries []SearchEntry, err error)

type SearchScraperExport

type SearchScraperExport struct {
	Url             string
	InitialComplete bool
	Token           string
	ChipFilters     []chipFilter
}

type SearchVideo

type SearchVideo struct {
	VideoID        string
	Title          string
	Date           string // e.g "2 years ago" or "5 hours ago", will be empty when its a livestream
	Length         string // e.g "15:54", will be empty when its a livestream
	Views, Viewers int
	IsLive         bool
	Thumbnails     []scraper.YoutubeImage
	ChannelAvatar  string

	HasNewBadge, HasCCBadge, Has4kBadge      bool
	AuthorIsVerified, AuthorIsVerifiedArtist bool

	Username, ChannelID, NewChannelID string

	TruncatedDescription string
}

Jump to

Keyboard shortcuts

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