shared

package
v0.0.0-...-bd878e7 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "development"
	Hash    = "development"
)

Variables

View Source
var (
	UserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
)

Functions

func InstagramIncognito

func InstagramIncognito(post string) ([]string, string, []*http.Cookie, error)

func Stream2MP4

func Stream2MP4(response io.ReadCloser, path string) error

func VSCO

func VSCO(owner, post string) (URL string, username string, err error)

Types

type Instagram

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

func NewInstagram

func NewInstagram(fbsr, sessionID, userID string) Instagram

func (*Instagram) Post

func (instagram *Instagram) Post(post string) (URLs []string, username string, err error)

func (*Instagram) Reels

func (instagram *Instagram) Reels(id string, highlight bool) (URLs []string, username string, err error)

type InstagramItem

type InstagramItem struct {
	CarouselMedia []struct {
		ImageVersions2 struct {
			Candidates []struct {
				URL string `json:"url"`
			} `json:"candidates"`
		} `json:"image_versions2"`
		VideoVersions []struct {
			URL string `json:"url"`
		} `json:"video_versions"`
	} `json:"carousel_media"`
	ImageVersions2 struct {
		Candidates []struct {
			URL string `json:"url"`
		} `json:"candidates"`
	} `json:"image_versions2"`
	VideoVersions []struct {
		URL string `json:"url"`
	} `json:"video_versions"`
	User struct {
		Username string `json:"username"`
	} `json:"user"`
}

func (*InstagramItem) URLs

func (item *InstagramItem) URLs() []string

type InstagramPost

type InstagramPost struct {
	Items [1]InstagramItem `json:"items"`
}

type InstagramPostIncognito

type InstagramPostIncognito struct {
	Data struct {
		ShortcodeMedia struct {
			EdgeSidecarChildren struct {
				Edges []struct {
					Node struct {
						DisplayURL string `json:"display_url"`
						VideoURL   string `json:"video_url"`
					} `json:"node"`
				} `json:"edges"`
			} `json:"edge_sidecar_to_children"`
			Owner struct {
				Username string `json:"username"`
			} `json:"owner"`
			DisplayURL string `json:"display_url"`
			VideoURL   string `json:"video_url"`
		} `json:"xdt_shortcode_media"`
	} `json:"data"`
}

func (*InstagramPostIncognito) URLs

func (post *InstagramPostIncognito) URLs() []string

type InstagramReels

type InstagramReels struct {
	ReelsMedia [1]struct {
		User struct {
			Username string `json:"username"`
		} `json:"user"`
		Items []InstagramItem `json:"items"`
	} `json:"reels_media"`
}

type InstagramUserID

type InstagramUserID struct {
	Data struct {
		User struct {
			ID string `json:"id"`
		} `json:"user"`
	} `json:"data"`
}

type TikTok

type TikTok struct {
	SessionID      string
	SessionIDGuard string
	ChainToken     string
}

func NewTikTok

func NewTikTok(sessionID, sessionIDGuard, chainToken string) TikTok

func (*TikTok) Post

func (tiktok *TikTok) Post(owner, post string, incognito bool) ([]string, string, []*http.Cookie, error)

type TikTokPost

type TikTokPost struct {
	DefaultScop struct {
		VideoDetail struct {
			ItemInfo struct {
				ItemStruct struct {
					Author struct {
						UniqueID string `json:"uniqueId"`
					} `json:"author"`
					ImagePost struct {
						Images []struct {
							ImageURL struct {
								URLs [1]string `json:"urlList"`
							} `json:"imageURL"`
						} `json:"images"`
					} `json:"imagePost"`
					Video struct {
						Cover       string `json:"cover"`
						PlayAddress string `json:"playAddr"`
					} `json:"video"`
				} `json:"itemStruct"`
			} `json:"itemInfo"`
		} `json:"webapp.video-detail"`
	} `json:"__DEFAULT_SCOPE__"`
}

type VSCOPost

type VSCOPost struct {
	Medias struct {
		ByID map[string]struct {
			Media struct {
				PermaSubdomain string `json:"permaSubdomain"`
				ResponsiveURL  string `json:"responsiveUrl"`
				VideoURL       string `json:"videoUrl"`
				PlaybackURL    string `json:"playbackUrl"`
				Site           struct {
					Domain string `json:"domain"`
				} `json:"site"`
			} `json:"media"`
		} `json:"byId"`
	} `json:"medias"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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