[go: up one dir, main page]

Skip to content

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

License

Notifications You must be signed in to change notification settings

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

https://api.travis-ci.org/siongui/instago.svg?branch=master https://goreportcard.com/badge/github.com/siongui/instago

https://img.shields.io/twitter/url/https/github.com/siongui/instago.svg?style=social

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

[1]GitHub - siongui/goiguserid: Get id of Instagram user in Go
[2]GitHub - siongui/goigstorylink: Get Links (URL) of Instagram Stories in Go
[3]GitHub - siongui/goigfollow: Get Instagram following and followers in Go
[4]GitHub - siongui/goigstorydl: Download Instagram Stories in Go
[5]GitHub - siongui/goigmedia: Get links of Instagram user media (photos and videos) in Go.
[6]JSON Formatter & Validator

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