instagram

package
v1.51.1 Latest Latest
Warning

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

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

README

Instagram

Android client

https://github.com/itsMoji/Instagram_SSL_Pinning

How to get User-Agent?

googleplay -a com.instagram.android

https://github.com/89z/googleplay

Why does this exist?

January 28 2022.

I use it myself.

https://instagram.com/p/CT-cnxGhvvO

Why not use other APIs?

/api/v1/media/ uses ID instead of shortcode.

/graphql/query/ API gets images up to 1080p, but not original quality.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Android = UserAgent{
	API:        99,
	Brand:      "brand",
	Density:    "density",
	Device:     "device",
	Instagram:  "222.0.0.15.114",
	Model:      "model",
	Platform:   "platform",
	Release:    9,
	Resolution: "9999x9999",
}
View Source
var LogLevel format.LogLevel

Functions

func Shortcode added in v1.46.7

func Shortcode(address string) string

Types

type EdgeText added in v1.49.2

type EdgeText struct {
	Edges []struct {
		Node struct {
			Text string
		}
	}
}

type EdgeURL added in v1.49.2

type EdgeURL struct {
	Edges []struct {
		Node struct {
			Display_URL string
			Video_URL   string
		}
	}
}

func (EdgeURL) URLs added in v1.49.7

func (e EdgeURL) URLs() []string

type GraphMedia added in v1.46.6

type GraphMedia struct {
	Edge_Media_To_Caption EdgeText
	Owner                 struct {
		Username string
	}
	Display_URL                  string
	Video_URL                    string
	Edge_Sidecar_To_Children     *EdgeURL
	Taken_At_Timestamp           int64
	Edge_Media_To_Parent_Comment EdgeText
}

func NewGraphMedia added in v1.46.6

func NewGraphMedia(shortcode string) (*GraphMedia, error)

func (GraphMedia) String added in v1.47.6

func (g GraphMedia) String() string

func (GraphMedia) URLs added in v1.46.6

func (g GraphMedia) URLs() []string

type ImageVersion added in v1.49.2

type ImageVersion struct {
	Candidates []struct {
		Width  int
		Height int
		URL    string
	}
}

type Item added in v1.32.1

type Item struct {
	Caption struct {
		Text string
	}
	User struct {
		Username string
	}
	Video_DASH_Manifest string
	Image_Versions2     ImageVersion
	Video_Versions      []VideoVersion
	Carousel_Media      []struct {
		Video_DASH_Manifest string
		Image_Versions2     ImageVersion
		Video_Versions      []VideoVersion
	}
	Taken_At int64
}

func (Item) String added in v1.49.8

func (i Item) String() (string, error)

func (Item) URLs added in v1.49.2

func (i Item) URLs() ([]string, error)

type Login added in v1.32.1

type Login struct {
	Authorization string
	Date          string
}

func NewLogin added in v1.32.1

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

func OpenLogin added in v1.44.4

func OpenLogin(elem ...string) (*Login, error)

func (Login) Create added in v1.44.4

func (l Login) Create(elem ...string) error

func (Login) Items added in v1.46.6

func (l Login) Items(shortcode string) ([]Item, error)

func (Login) User added in v1.47.5

func (l Login) User(username string) (*User, error)

type User added in v1.47.5

type User struct {
	Edge_Followed_By struct {
		Count int64
	}
	Edge_Follow struct {
		Count int64
	}
	Edge_Owner_To_Timeline_Media EdgeURL
}

func NewUser added in v1.47.5

func NewUser(username string) (*User, error)

func (User) String added in v1.47.5

func (u User) String() string

type UserAgent added in v1.46.3

type UserAgent struct {
	API        int64
	Brand      string
	Density    string
	Device     string
	Instagram  string
	Model      string
	Platform   string
	Release    int64
	Resolution string
}

I noticed that even with the posts that have `video_dash_manifest`, you have to request with a correct User-Agent. If you use wrong agent, you will get a normal response, but the `video_dash_manifest` will be missing.

func (UserAgent) String added in v1.46.3

func (u UserAgent) String() string

type VideoVersion added in v1.49.2

type VideoVersion struct {
	Type   int
	Width  int
	Height int
	URL    string
}

Jump to

Keyboard shortcuts

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