Giter VIP home page Giter VIP logo

instagram-bot's Introduction

instagram-bot project

The instagram-bot project is tool for automating various tasks on Instagram.


Description

instagram-bot aims to automate tasks such as posting, liking, following, and more on the Instagram platform. While currently only the post_uploader.py module is available, additional modules will be added in the future to extend the functionality of the bot.


Installation

To install and use the project, follow these steps:

Clone the repository to your computer and go to project directory:

git clone https://github.com/alexsavenko/instagram-bot.git
cd InstagramBot

Install dependencies using pip:

pip install -r requirements.txt

Install playwright browsers:

playwright install

Usage

post_uploader.py module

Note

This module use headless webdriver (playwright) for interaction with Instagram trough login. For avoiding frequent login - application saving and reuse browser storage data in file insta_state.json (creates after first success login). For change this file storage path - edit variable INSTA_STATE_FILE in post_uploader.py (by default file is next to post_uploader.py)

For demo run

  1. edit params in demo_post_uploader.py
params = {
    'login': 'your_username',
    'pwd': 'your_password',
    'file': '/path/to/your/file.jpg',
    'caption': 'caption for post that will be uploaded'
}
  1. run demo_post_uploader.py
python3 demo_post_uploader.py

Import in to your script

You can copy the file post_uploader.py in your project folder and use it like in example:

import post_uploader as pu

login = 'your_username'
pwd = 'your_password'
file = '/path/to/your/file.jpg'
caption = 'Check out this awesome photo!'

# create post
pu.create_post(login, pwd, file, caption)
  • login (str): The username for authentication to Instagram.
  • pwd (str): The password for authentication to Instagram.
  • file (str): The path to the image or video file to be posted (look at Instagram requirements for posts).
  • caption (str): The caption or description for the post.

Feedback and Suggestions

This is my first project in Python, and I am still getting acquainted with this cool tool. I welcome any feedback, comments, and advice from the community...It's very important to me. If you have any suggestions on how to improve this project, please feel free to let me know!


Disclaimer

  1. This application is an open-source project intended for learning and research purposes.
  2. The author assumes no responsibility for any direct or indirect losses incurred through the use of this application.
  3. When using this application, it is essential to comply with the laws and regulations of your country or region and refrain from any illegal activities.

By using this application, you agree to and accept all the terms and conditions of this disclaimer. If you do not agree with these terms, please refrain from using this application.

instagram-bot's People

Contributors

alexsavenko avatar

Stargazers

Paillat avatar Stephen Kurniawan avatar

Watchers

 avatar

instagram-bot's Issues

Timeout exceeded.

Hello Alex, im Federico. Im testing your project and do the login correctly, but i have this error:

File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\playwright_impl_connection.py", line 97, in inner_send
result = next(iter(done)).result()
^^^^^^^^^^^^^^^^^^^^^^^^^
playwright._impl._errors.TimeoutError: Timeout 30000ms exceeded.

Do you know how to fix it?

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.