Skip to content

siongui/instago

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instagram Photo, Video, Story, Highlight, Postlive, Following, and Follower in Go

image

image

image

image

image

image

image

Get Instagram media (photos and videos), stories, story highlights, postlives, following and followers in Go.

This package only access Instagram private and public API:

Obtain Cookies

Use Chrome extension in this repo to get the cookies. Load the extension using Chrome extension developer mode. Log in to Instagram using Chrome. Click on the loaded extension button and save the content as auth.json. We will use it later to access Instagram API.

Terminology

Given the URL of the post as follows:

https://www.instagram.com/p/BfJzG64BZVY/

The code of the post is BfJzG64BZVY.

Usage

This package instago only access the Instagram public and private API and get metadata from the API.

Install the package by go get:

$ go get -u github.com/siongui/instago

You can use the following methods without cookies

For the other methods which need cookies to access Instagram API, you must call NewInstagramApiManager first:

import (
  "github.com/siongui/instago"
)

mgr := instago.NewInstagramApiManager("auth.json")

Then you can use mgr to get metadata from Instagram API. For example, you can get all post codes of the user instagram as follows:

codes, err := mgr.GetAllPostCode("instagram")
if err != nil {
  panic(err)
}

for _, code := range codes {
  println("URL: https://www.instagram.com/p/%s/\n", code)
}

For complete examples, see test files (files ends with _test.go). The following are some examples you may be interested in:

Tricks

Private API

UNLICENSE

Released in public domain. See UNLICENSE.

References

About

Download/access photos, videos, stories, story highlights, postlives, following and followers of Instagram

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages