core

package
v0.0.0-...-3824f1a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(URL string, index int)

func ListVariants

func ListVariants(URL string)

func Variants

func Variants(URL string) []*m3u8.Variant

Types

type YappyMeta

type YappyMeta struct {
	Props struct {
		StoreType interface{} `json:"storeType"`
		URL       string      `json:"url"`
		PageProps struct {
			Data struct {
				UUID        string    `json:"uuid"`
				Description string    `json:"description"`
				Link        string    `json:"link"`
				Thumbnail   string    `json:"thumbnail"`
				PublishedAt time.Time `json:"publishedAt"`
				Creator     struct {
					UUID          string `json:"uuid"`
					Nickname      string `json:"nickname"`
					FirstName     string `json:"firstName"`
					Avatar        string `json:"avatar"`
					IsSubscribed  bool   `json:"isSubscribed"`
					IsTrendsetter bool   `json:"isTrendsetter"`
				} `json:"creator"`
				Challenge        interface{}   `json:"challenge"`
				LikesCount       int           `json:"likesCount"`
				CommentsCount    int           `json:"commentsCount"`
				ModerationBlock  interface{}   `json:"moderationBlock"`
				IsCollabAllow    bool          `json:"isCollabAllow"`
				UuidsCollabVideo []interface{} `json:"uuidsCollabVideo"`
				CollabCount      int           `json:"collabCount"`
				Authors          struct {
					Count   int      `json:"count"`
					Avatars []string `json:"avatars"`
				} `json:"authors"`
				MusicaAudioIds     interface{} `json:"musicaAudioIds"`
				IsVisibilityCollab bool        `json:"isVisibilityCollab"`
				Audio              struct {
					ID        string `json:"id"`
					Title     string `json:"title"`
					VideoUUID string `json:"videoUuid"`
					CoverURL  string `json:"coverUrl"`
					Published bool   `json:"published"`
					Licensed  bool   `json:"licensed"`
					Duration  int    `json:"duration"`
					CreatedAt string `json:"createdAt"`
					Link      string `json:"link"`
					Username  string `json:"username"`
				} `json:"audio"`
				ViewsCount   int  `json:"viewsCount"`
				IsLiked      bool `json:"isLiked"`
				SharingCount int  `json:"sharingCount"`
				Categories   []struct {
					UUID string `json:"uuid"`
					Name string `json:"name"`
				} `json:"categories"`
				ShowInIndex bool `json:"showInIndex"`
			} `json:"data"`
			IsError             bool        `json:"isError"`
			HTTPStatus          int         `json:"httpStatus"`
			ErrorMessage        interface{} `json:"errorMessage"`
			ErrorDescription    interface{} `json:"errorDescription"`
			OpenGraphParameters struct {
				Params struct {
					UUID        string    `json:"uuid"`
					Description string    `json:"description"`
					Link        string    `json:"link"`
					Thumbnail   string    `json:"thumbnail"`
					PublishedAt time.Time `json:"publishedAt"`
					Creator     struct {
						UUID          string `json:"uuid"`
						Nickname      string `json:"nickname"`
						FirstName     string `json:"firstName"`
						Avatar        string `json:"avatar"`
						IsSubscribed  bool   `json:"isSubscribed"`
						IsTrendsetter bool   `json:"isTrendsetter"`
					} `json:"creator"`
					Challenge        interface{}   `json:"challenge"`
					LikesCount       int           `json:"likesCount"`
					CommentsCount    int           `json:"commentsCount"`
					ModerationBlock  interface{}   `json:"moderationBlock"`
					IsCollabAllow    bool          `json:"isCollabAllow"`
					UuidsCollabVideo []interface{} `json:"uuidsCollabVideo"`
					CollabCount      int           `json:"collabCount"`
					Authors          struct {
						Count   int      `json:"count"`
						Avatars []string `json:"avatars"`
					} `json:"authors"`
					MusicaAudioIds     interface{} `json:"musicaAudioIds"`
					IsVisibilityCollab bool        `json:"isVisibilityCollab"`
					Audio              struct {
						ID        string `json:"id"`
						Title     string `json:"title"`
						VideoUUID string `json:"videoUuid"`
						CoverURL  string `json:"coverUrl"`
						Published bool   `json:"published"`
						Licensed  bool   `json:"licensed"`
						Duration  int    `json:"duration"`
						CreatedAt string `json:"createdAt"`
						Link      string `json:"link"`
						Username  string `json:"username"`
					} `json:"audio"`
					ViewsCount   int  `json:"viewsCount"`
					IsLiked      bool `json:"isLiked"`
					SharingCount int  `json:"sharingCount"`
					Categories   []struct {
						UUID string `json:"uuid"`
						Name string `json:"name"`
					} `json:"categories"`
					ShowInIndex bool `json:"showInIndex"`
				} `json:"params"`
				Key string `json:"key"`
			} `json:"openGraphParameters"`
		} `json:"pageProps"`
		NSsp bool `json:"__N_SSP"`
	} `json:"props"`
	Page  string `json:"page"`
	Query struct {
		UID string `json:"uid"`
	} `json:"query"`
	BuildID       string `json:"buildId"`
	RuntimeConfig struct {
		VideoserviceURL        string `json:"VIDEOSERVICE_URL"`
		Environment            string `json:"ENVIRONMENT"`
		SentryDsn              string `json:"SENTRY_DSN"`
		AmplitudeURL           string `json:"AMPLITUDE_URL"`
		AmplitudeAPIKey        string `json:"AMPLITUDE_API_KEY"`
		CollectionID           string `json:"COLLECTION_ID"`
		GooglePlayAvailable    string `json:"GOOGLE_PLAY_AVAILABLE"`
		YandexMetrikaID        string `json:"YANDEX_METRIKA_ID"`
		LandingYandexMetrikaID string `json:"LANDING_YANDEX_METRIKA_ID"`
		RedisHost              string `json:"REDIS_HOST"`
		RedisPort              string `json:"REDIS_PORT"`
		Logging                string `json:"LOGGING"`
	} `json:"runtimeConfig"`
	IsFallback   bool          `json:"isFallback"`
	Gssp         bool          `json:"gssp"`
	CustomServer bool          `json:"customServer"`
	AppGip       bool          `json:"appGip"`
	ScriptLoader []interface{} `json:"scriptLoader"`
}

func ParseMeta

func ParseMeta(URL string) (body *YappyMeta, err error)

Jump to

Keyboard shortcuts

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