Documentation
¶
Index ¶
Constants ¶
View Source
const ( API_TYPE = "live_chat" YT_CFG_REGEX = `ytcfg\.set\s*\(\s*({.+?})\s*\)\s*;` INITIAL_DATA_REGEX = `(?:window\s*\[\s*["\']ytInitialData["\']\s*\]|ytInitialData)\s*=\s*({.+?})\s*;\s*(?:var\s+meta|</script|\n)` )
Variables ¶
Functions ¶
func AddCookies ¶ added in v2.0.3
Types ¶
type Actions ¶
type Actions struct { AddChatItemAction struct { Item struct { LiveChatTextMessageRenderer struct { Message struct { Runs []Runs `json:"runs"` } `json:"message"` AuthorName struct { SimpleText string `json:"simpleText"` } TimestampUsec string `json:"timestampUsec"` } `json:"liveChatTextMessageRenderer"` } `json:"item"` } `json:"addChatItemAction"` }
type ChatMessage ¶
func FetchContinuationChat ¶
func FetchContinuationChat(continuation string, ytCfg YtCfg) ([]ChatMessage, string, error)
type ChatMessagesResponse ¶
type ChatMessagesResponse struct { ContinuationContents struct { LiveChatContinuation struct { Actions []Actions `json:"actions"` Continuations []ContinuationChat `json:"continuations"` } `json:"liveChatContinuation"` } `json:"continuationContents"` }
type Context ¶
type Context struct { Context InnerTubeContext `json:"context"` Continuation string `json:"continuation"` }
type ContinuationChat ¶
type ContinuationChat struct { TimedContinuationData struct { Continuation string `json:"continuation"` TimeoutMs int `json:"timeoutMs"` } `json:"timedContinuationData"` InvalidationContinuationData struct { Continuation string `json:"continuation"` TimeoutMs int `json:"timeoutMs"` } `json:"invalidationContinuationData"` }
type InitialData ¶
type InitialData struct { Contents struct { TwoColumnWatchNextResults struct { ConversationBar struct { LiveChatRenderer struct { Header struct { LiveChatHeaderRenderer struct { ViewSelector struct { SortFilterSubMenuRenderer struct { SubMenuItems []SubMenuItems `json:"subMenuItems"` } } } } } } } } }
type InnerTubeContext ¶
type InnerTubeContext struct { Client struct { Hl string `json:"hl"` Gl string `json:"gl"` RemoteHost string `json:"remoteHost"` DeviceMake string `json:"deviceMake"` DeviceModel string `json:"deviceModel"` VisitorData string `json:"visitorData"` UserAgent string `json:"userAgent"` ClientName string `json:"clientName"` ClientVersion string `json:"clientVersion"` OsName string `json:"osName"` OsVersion string `json:"osVersion"` OriginalUrl string `json:"originalUrl"` Platform string `json:"platform"` ClientFormFactor string `json:"clientFormFactor"` ConfigInfo struct { AppInstallData string `json:"appInstallData"` } `json:"configInfo"` } `json:"client"` }
type SubMenuItems ¶
Click to show internal directories.
Click to hide internal directories.