Documentation ¶
Index ¶
- Constants
- func GetLiveInfo(ys *youtube.Service, vid string) (videoInfo *youtube.Video, err error)
- func GetLiveStreamID(ys *youtube.Service, channnelID string) (string, error)
- func GetSuperChatRawMessages(ys *youtube.Service, cid, next string) (messages []*youtube.LiveChatMessage, nextToken string, intervalMillis int64, ...)
- type ChatMessage
- func GetLiveChatMessagesFromProxy(chatJSON string) ([]*ChatMessage, bool, error)
- func GetLiveChatMessagesFromProxy2(chatJSON string) ([]*ChatMessage, bool, error)
- func GetReplayChatMessagesFromProxy(chatJSON string) ([]*ChatMessage, bool, error)
- func GetReplayChatMessagesFromProxy2(chatJSON string) ([]*ChatMessage, bool, error)
- type Contents
- type Continuation
- type ConversationBar
- type LiveChatInfo
- type LiveChatRenderer
- type ReloadContinuationData
- type TwoColumnWatchNextResults
- type UpcomingLiveInfo
Constants ¶
const MaxMessageCount = 2000
Variables ¶
This section is empty.
Functions ¶
func GetLiveInfo ¶
GetLiveInfo return video info.
func GetLiveStreamID ¶
GetLiveStreamID return active live ID in specified channnel.
Types ¶
type ChatMessage ¶
type ChatMessage struct { VideoInfo struct { ChannelID string `json:"cid,omitempty"` ChannelTitle string `json:"ctitle,omitempty"` VideoID string `json:"vid,omitempty"` VideoTitle string `json:"vtitle,omitempty"` ScheduledStartTime string `json:"scheduledStartTime,omitempty"` ActualStartTime string `json:"actualStartTime,omitempty"` } `json:"videoInfo,omitempty"` Message struct { MessageID string `json:"messageID,omitempty"` MessageType string `json:"type,omitempty"` AuthorName string `json:"authorName,omitempty"` IsModerator bool `json:"isModerator,omitempty"` IsMember bool `json:"isMember,omitempty"` IsOwner bool `json:"isOwner,omitempty"` AccessibilityLabel string `json:"accessibilityLabel,omitempty"` AuthorChannelID string `json:"authorChannelID,omitempty"` UserComment string `json:"userComment,omitempty"` PublishedAt string `json:"publishedAt,omitempty"` AmountDisplayString string `json:"amountDisplayString,omitempty"` CurrencyRateToJPY float64 `json:"currencyRateToJPY,omitempty"` AmountJPY uint `json:"amountJPY,omitempty"` Currency string `json:"currency,omitempty"` RawMessage *youtube.LiveChatMessage `json:"rawMessage,omitempty"` } `json:"message,omitempty"` }
ChatMessage : output json.
func GetLiveChatMessagesFromProxy ¶
func GetLiveChatMessagesFromProxy(chatJSON string) ([]*ChatMessage, bool, error)
GetLiveChatMessagesFromProxy scrape live chat
func GetLiveChatMessagesFromProxy2 ¶
func GetLiveChatMessagesFromProxy2(chatJSON string) ([]*ChatMessage, bool, error)
GetLiveChatMessagesFromProxy2 scrape live chat
func GetReplayChatMessagesFromProxy ¶
func GetReplayChatMessagesFromProxy(chatJSON string) ([]*ChatMessage, bool, error)
GetReplayChatMessagesFromProxy scrape live chat
func GetReplayChatMessagesFromProxy2 ¶
func GetReplayChatMessagesFromProxy2(chatJSON string) ([]*ChatMessage, bool, error)
GetReplayChatMessagesFromProxy2 scrape replay live chat
func (*ChatMessage) ConvertToJPY ¶
func (m *ChatMessage) ConvertToJPY() error
ConvertToJPY convert to JPY
type Contents ¶
type Contents struct {
TwoColumnWatchNextResults *TwoColumnWatchNextResults `json:"twoColumnWatchNextResults,omitempty"`
}
Contents is json struct
type Continuation ¶
type Continuation struct {
ReloadContinuationData *ReloadContinuationData `json:"reloadContinuationData,omitempty"`
}
Continuation is json struct
type ConversationBar ¶
type ConversationBar struct {
LiveChatRenderer *LiveChatRenderer `json:"liveChatRenderer,omitempty"`
}
ConversationBar is json struct
type LiveChatInfo ¶
type LiveChatInfo struct {
Contents *Contents `json:"contents,omitempty"`
}
LiveChatInfo is json struct
type LiveChatRenderer ¶
type LiveChatRenderer struct {
Continuations []*Continuation `json:"continuations,omitempty"`
}
LiveChatRenderer is json struct
type ReloadContinuationData ¶
type ReloadContinuationData struct {
Continuation string `json:"continuation,omitempty"`
}
ReloadContinuationData is json struct
type TwoColumnWatchNextResults ¶
type TwoColumnWatchNextResults struct {
ConversationBar *ConversationBar `json:"conversationBar,omitempty"`
}
TwoColumnWatchNextResults is json struct
type UpcomingLiveInfo ¶
UpcomingLiveInfo struct
func GetUpcommingLiveID ¶
func GetUpcommingLiveID(u *url.URL) (upcomingInfo []*UpcomingLiveInfo, err error)
GetUpcommingLiveID return channel id.
func GetUpcommingLiveIDFromChannelPage ¶
func GetUpcommingLiveIDFromChannelPage(channel string) (upcomingInfo []*UpcomingLiveInfo, err error)
GetUpcommingLiveIDFromChannelPage return channel id.