Giter Site home page Giter Site logo

new-dev0 / instagrapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from subzeroid/instagrapi

1.0 0.0 2.0 5.13 MB

๐Ÿ”ฅ The fastest and powerful Python library for Instagram Private API 2021

Home Page: https://adw0rd.github.io/instagrapi/

License: MIT License

Python 98.85% Dockerfile 0.13% Shell 1.02%

instagrapi's Introduction

Package PyPI PyPI - Python Version Checked with mypy

Downloads Downloads Downloads

Donate

If you are tired of being blocked when receiving data from Instagram, I recommend using our service - Lamadava SaaS

Features:

  • Anonymous getting of user, posts, stories, highlights, followers and following users
  • Anonymous getting an email and phone number, if the user specified them in his business profile
  • Anonymous getting of post, story, album, Reels, IGTV data and the ability to download content
  • Anonymous getting of hashtag and location data, as well as a list of posts for them
  • Anonymous getting of all comments on a post and a list of users who liked it
  • Management of proxy servers, mobile devices, solving captcha and challenge resolver
  • Login by username and password, sessionid and support 2FA
  • Managing messages and threads for Direct and attach files
  • Download and upload a Photo, Video, IGTV, Reels, Albums and Stories
  • Work with Users, Posts, Comments, Insights, Collections, Location and Hashtag
  • Insights by account, posts and stories
  • Like, following, commenting, editing account (Bio) and much more else

instagrapi - Unofficial Instagram API for Python

Fast and effective Instagram Private API wrapper (public+private requests and challenge resolver) without selenium. Use the most recent version of the API from Instagram, which was obtained using reverse-engineering with Charles Proxy and Proxyman.

Instagram API valid for 17 October 2021 (last reverse-engineering check)

Support Python >= 3.6, recommend 3.8+

For any other languages (e.g. C++, C#, F#, D, Golang, Erlang, Elixir, Nim, Haskell, Lisp, Closure, Julia, R, Java, Kotlin, Scala, OCaml, JavaScript, Crystal, Ruby, Rust, Swift, Objective-C, Visual Basic, .NET, Pascal, Perl, Lua, PHP and others), I suggest using instagrapi-rest or Lamadava SaaS

Support Chat in Telegram and GitHub Discussions

Features

  1. Performs Public API (web, anonymous) or Private API (mobile app, authorized) requests depending on the situation (to avoid Instagram limits)
  2. Login by username and password, including 2FA and by sessionid (and uses Authorization header instead Cookies)
  3. Challenge Resolver have Email and SMS handlers
  4. Support upload a Photo, Video, IGTV, Reels, Albums and Stories
  5. Support work with User, Media, Comment, Insights, Collections, Location (Place), Hashtag and Direct Message objects
  6. Like, Follow, Edit account (Bio) and much more else
  7. Insights by account, posts and stories
  8. Build stories with custom background, font animation, swipe up link and mention users
  9. In the next release, account registration and captcha passing will appear

Examples of apps that use instagrapi

Basic Usage

from instagrapi import Client

cl = Client()
cl.login(ACCOUNT_USERNAME, ACCOUNT_PASSWORD)

user_id = cl.user_id_from_username("adw0rd")
medias = cl.user_medias(user_id, 20)
Additional example
from instagrapi import Client
from instagrapi.types import StoryMention, StoryMedia, StoryLink, StoryHashtag

cl = Client()
cl.login(USERNAME, PASSWORD, verification_code="<2FA CODE HERE>")

media_pk = cl.media_pk_from_url('https://www.instagram.com/p/CGgDsi7JQdS/')
media_path = cl.video_download(media_pk)
adw0rd = cl.user_info_by_username('adw0rd')
hashtag = cl.hashtag_info('dhbastards')

cl.video_upload_to_story(
    media_path,
    "Credits @adw0rd",
    mentions=[StoryMention(user=adw0rd, x=0.49892962, y=0.703125, width=0.8333333333333334, height=0.125)],
    links=[StoryLink(webUri='https://github.com/adw0rd/instagrapi')],
    hashtags=[StoryHashtag(hashtag=hashtag, x=0.23, y=0.32, width=0.5, height=0.22)],
    medias=[StoryMedia(media_pk=media_pk, x=0.5, y=0.5, width=0.6, height=0.8)]
)

Documentation

instagrapi's People

Contributors

1danish-00 avatar a13sha avatar adw0rd avatar bedefaced avatar dependabot[bot] avatar elmissouri16 avatar gabrielloliveira avatar jammy108 avatar jashparekh avatar julienmaille avatar leraner avatar ljcanales avatar markdrrr avatar new-dev0 avatar ohld avatar sourcery-ai[bot] avatar tonycpsu avatar trashmit avatar truroshan avatar wpbloger avatar

Stargazers

 avatar

Forkers

tamilvip007

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.