Skip to main content

Instagram Unofficial SDK

Project description

Install

  • Clone the repository git clone git@github.com:manuelfedele/instagraph.git
  • Install requirements pip install -r requirements.txt

Samples

The api just extract shared data included in every Instagram request.

  • Get user data
from instagraph import API
from pprint import pprint
api = Instagraph()
response = api.get_user('elonrmuskk')
pprint(response)
{'biography': '',
 'blocked_by_viewer': False,
 'business_category_name': None,
 'category_id': None,
 'connected_fb_page': None
 # ...
}
  • Get medias from hashtag api.get_hashtag_feed('puppy')
  • Get media info by shortcode api.get_media('B6Vs_JMnhb0')

Some useful handlers are provided

  • Get medias from hashtag (using HashtagFeed class) and pagination handling
from instagraph import HashtagFeed
feed = HashtagFeed('puppy')

# Going to next page
feed.next_page()
  • Get profile infos (using Profile class) by username
from instagraph import Profile
musk = Profile('elonrmuskk')

print(musk.username)     # elonrmuskk
print(musk.followers)    # 670792
print(musk.following)    # 43
print(musk.medias_count) # 144
print(musk.is_verified)  # False

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for instagraph, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size instagraph-0.0.2-py3-none-any.whl (19.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size instagraph-0.0.2.tar.gz (17.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page