Git Product home page Git Product logo

insta-bot's Introduction

InstaBot

Instagram bot implemented in Kotlin to perform all major operations supported by Instagram app.

Features

  • Like medias
  • Comment medias
  • Direct messages
  • Watch stories
  • Download medias
  • Hashtag targeting
  • Location targeting
  • And more...

Built with

Kotlin - A modern programming language for Android/JVM that makes developers happier.

Coroutines - For asynchronous programming

Flow - A cold asynchronous data stream that sequentially emits values and completes normally or with an exception.

JsonPathKt - A lighter and more efficient implementation of JsonPath in Kotlin

Installation

Add JitPack to your build.gradle.kts file

repositories {
    ...
    maven(url = "https://jitpack.io")
}

Add Gradle dependency to your build.gradle.kts file

dependencies {
    implementation("com.github.hadiyarajesh:insta-bot:Tag")
}

Quick start

Set your Instagram username and password in Credentials.Kt file

object Credentials {
    const val USERNAME = "your_instagram_username"
    const val PASSWORD = "your_instagram_password"
}

Initialize InstagramBot class with credential value and call prepare method. Then, call login method to login into instagram. (Prepare method must be called before login method)

    val username = Credentials.USERNAME
    val password = Credentials.PASSWORD

    val bot = InstagramBot()
    bot.prepare(username)
    bot.login(username, password)

Now you can perform any operations of your choice like.

// Get 100 followers of you
bot.getSelfFollowers(100).collect { println(it) }
// Like 5 medias from explore page
bot.likeMediasByExplorePage(5).collect { println(it) }
// Approve all pending follow requests
bot.approveAllPendingFollowRequests().collect { println(it) }
// Watch stories of 200 users based on given location
bot.watchLocationUsersStories("enter_location_name_here", 200).collect { println(it) }

For more details, refer BotTest file.

Samples

You can find ready to use sample scripts here

Documentation

You can find documentation here

Contributing

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

Terms and conditions

  • You will NOT use this API for marketing purposes (spam, botting, harassment).
  • We do NOT give support to anyone who wants to use this API to send spam or commit other crimes.
  • We reserve the right to block any user of this repository that does not meet these conditions.

Legal

This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by Instagram, Facebook inc. or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use it at your own risk.

License

MIT License

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.