instagram

package
v1.32.7 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: OSL-3.0 Imports: 7 Imported by: 0

README

Instagram

Single image:

CUV3UsjL1WM

Multiple image:

CT-cnxGhvvO

Video:

CUWBw4TM6Np

https://github.com/github/dmca/blob/master/2020/01/2020-01-22-facebook.md

Documentation

Index

Constants

View Source
const (
	OriginI   = "https://i.instagram.com"
	OriginWWW = "https://www.instagram.com"
)

Variables

View Source
var Verbose bool

Functions

func Valid added in v1.32.4

func Valid(shortcode string) error

instagram.com/p/CT-cnxGhvvO

Types

type Edge added in v1.31.2

type Edge struct {
	Node struct {
		Display_URL string
	}
}

type Item added in v1.32.1

type Item struct {
	Media struct {
		Video_Versions []struct {
			URL string
		}
	}
}

type Login added in v1.32.1

type Login struct {
	http.Header
}

func NewLogin added in v1.32.1

func NewLogin(username, password string) (*Login, error)

func (*Login) Decode added in v1.32.5

func (l *Login) Decode(r io.Reader) error

This can be used to decode an existing login response.

func (Login) Encode added in v1.32.2

func (l Login) Encode(w io.Writer) error

func (Login) Item added in v1.32.1

func (l Login) Item(shortcode string) (*Item, error)

type Media added in v1.31.9

type Media struct {
	Shortcode_Media struct {
		Display_URL              string
		Edge_Sidecar_To_Children *struct {
			Edges []Edge
		}
		Video_URL string
	}
}

func GraphQL added in v1.32.6

func GraphQL(shortcode string, auth *Login) (*Media, error)

If `auth` is `nil`, then anonymous request will be used.

func (Media) Edges added in v1.31.9

func (m Media) Edges() []Edge

type Query added in v1.32.3

type Query struct {
	Query_Hash string `json:"query_hash"`
	Variables  struct {
		Shortcode string `json:"shortcode"`
	} `json:"variables"`
}

func NewQuery added in v1.32.3

func NewQuery(shortcode string) Query

func (Query) Data added in v1.32.6

func (q Query) Data(auth *Login) (*Media, error)

If `auth` is `nil`, then anonymous request will be used.

Jump to

Keyboard shortcuts

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