Giter Site home page Giter Site logo

instapi's Introduction

INSTApi

Python Instagram Private Api

It's Instagram's mobile API. Contains not all possible methods but it can pass instagram challenge.

Example:

from INSTApi.Client import INSTApi_Client

login = 'YOUR_LOGIN'
password = 'YOUR_PASSWORD'
proxy = login:password@127.0.0.1:5000 # or 127.0.0.1:5000 or None if proxy not needed

try:
    api = INSTApi_Client(login, password, proxy)
    if not api.login_success:
        if (api.challenge):
            method = None
            while(method != "0" and method != "1"):
                print("Enter auth method:")
                print("0 - Send code to mobile phone")
                print("1 - Send code to email")
                print("2 - Cancel")
                method = input("Enter number: ")
                if (method == "2"):
                    method = None
                    break
                
            if (method == None): 
                print('Authorization: cancel')
                return False
            
            api.verify_method = method
            res = api.start_challenge()
            if (res):
                code = input("Введите код: ")
                
                if (code == None): 
                    print('Authorization: cancel')
                    return False
                
                res = api.send_code(code)
        
        if (not api.challenge_passed):
            print('Error: challenge not passed')
            return False

except INSTApi.utils.Errors.ClientLoginError:
    print('Error: wrong login or password')
    return False
except:
    print('Authorization: error')
    return False

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.