GithubHelp home page GithubHelp logo

hiaselhans / instauto Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stanvanrooy/instauto

0.0 2.0 0.0 9.38 MB

Simple to use wrapper around the private Instagram API, written in Python.

Home Page: https://instauto.readthedocs.io

License: MIT License

Python 100.00%

instauto's Introduction

Instauto

All Contributors GitHub stars PyPI license Downloads coverage Documentation Status

instauto is a Python package for automating Instagram, making use of the private Instagram API. instauto tries to have feature parity with the Instagram app.

Overview

Instauto has 3 main api's that can be used: instauto.api, instauto.bot and instauto.helpers. You should probably use instauto.helpers and only start using instauto.api when you actually need its functionality.

Everything in instauto, is based around the 'core' instauto.api package. This package interacts directly with the private Instagram API and contains all functionality. This package is both the most flexible (you can update all requests sent and receive the full response back, for example), but also the most complex. You likely do not need to use this package.

The instauto.helpers package, is an abstraction above the instauto.api pacakge. It offers a little bit less flexibility, but is a lot less complex to use. It also offers typed models.

The instauto.bot package, is another abstraction, but this time over the instauto.helpers package. This package has pretty much no flexibility, but can be set up in 10 lines of Python code.

Installation

The package can be installed with the following pip command: pip install instauto

Getting started

Below are a few examples for getting stared quickly. After getting started, you'll probably want to take a quick look at the more detailed documentation on readthedocs.

Authentication

You'll want to do this as little as possible. Instagram sees logging in often as a huge red flag.

from instauto.api import ApiClient
client = ApiClient(username='your_username', password='your_password')
client.log_in()

Restoring state

Because of that, you can restore your session.

client.save_to_disk('your-savefile.instauto')
client = ApiClient.initiate_from_file('your-savefile.instauto')

Making new friends

Ofcourse instauto also supports (un)following users.

from instauto.helpers.friendships import follow_user, unfollow_user
follow_user(client, username='stan000_')
unfollow_user(client, username='stan000_')

Finding new friends

But before you can follow users, you'll need to find them first.

from instauto.helpers.search import search_username
users = search_username(client, "username", 10)

Retrieving 100 of your followers

Getting a list of users that follow you is also super simple.

from instauto.helpers.friendships import get_followers
followers = get_followers(client, username='your_username', limit=100)

Uploading images

instauto also offers a simple API for uploading images to your feed and story.

from instauto.helpers.post import upload_image_to_feed
upload_image_to_feed(client, './cat.jpg', 'Hello from instauto!')

Looking at your feed

Your feed can't be missing, it's pretty much what Instagram is about, isn't it?

from instato.helpers.feed import get_feed
posts = get_feed(client, 100)

More examples

Looking for something else? We have more examples:

Stil no look? Submit a feature request!

Support

This is a hobby project, which means sometimes other things take priority. I will review issues and work on issues when I have the time. Spamming new issues, asking for a ton of updates, or things like that, will not speed up the process. It will probably even give me less motivation to work on it :)

If you're looking for paid support, please reach out to me at [email protected].

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

There's an article up on the wiki, that explains how to set up a development environment.

License

MIT

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Maroš Gonda

⚠️ 💻

Norbert Gocník

💻

Jakub Juhas

💻 📖 ⚠️

Samu1808

💻

Kevin Jonathan

📖

Martin Nikolov

💻

b177y

💻 ⚠️ 📖

wowopo

💻

Stan van Rooy

📖 💻 ⚠️

Tizian Seehaus

💻

Florkast

📖

Artur

💻 📖

Felix Fischer

💻

alperenkaplan

💻 📖

Javadz

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

instauto's People

Contributors

allcontributors[bot] avatar alperenkaplan avatar atnartur avatar b177y avatar dependabot[bot] avatar fislix avatar hiaselhans avatar itsflorkast avatar javad94 avatar juhas96 avatar kevinjon27 avatar marosgonda avatar marvic2409 avatar returnwow avatar samu1808 avatar stanvanrooy avatar tibotix avatar

Watchers

 avatar  avatar

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.