Skip to content

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

License

Notifications You must be signed in to change notification settings

Samu1808/instauto

 
 

Repository files navigation

Instauto

All Contributors tests GitHub stars PyPI license Downloads coverage

Instauto is a Python package for automating various parts of Instagram, making use of the private Instagram API.

For feature requests, ideas, comments, etc., please open an issue.

Installation

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

Usage

Here is a simple example that likes a post.

from instauto.api.client import ApiClient
from instauto.api.actions import post as ps

if __name__ == '__main__':
    client = ApiClient("your_username", "your_password")
    client.login()
    
    like = ps.Like(
        media_id="1734612737423614055_6400760974"
    )
    client.post_like(like)

And here is a simple example that uses the Bot class. This example, retrieves 100 followers from @Instagram, 61 accounts that @Instagram follows, 200 accounts that have liked a recent post of @Instagram and 200 accounts that recently commented on a post of @Instagram.

Each retrieved account has a 25% chance to be followed, a 25% chance that 3 posts will be liked, and a 35% chance that 1 comment will be left.

from instauto.bot.bot import Bot
bot = Bot("your_username", "your_password", 20.0)

bot.input. \
    from_followers_of("instagram", 100). \
    from_following_of("instagram", 61). \
    from_likers_of("instagram", 200). \
    from_commenters_of("instagram", 200)

bot. \
    like(25, 3). \  
    comment(35, 1, ["hey, I like your posts!", "Looks good!"]). \
    follow(25)

bot.start()

Other examples of how to use the package, can be found in the examples directory.

Contributing

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

Please make sure to update tests as appropriate.

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

💻

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%