Name | instagram-autoresponder JSON |
Version |
0.0.2a2
JSON |
| download |
home_page | |
Summary | Automatically respond to Instagram direct messages based on predefined rules. |
upload_time | 2024-02-09 00:53:46 |
maintainer | |
docs_url | None |
author | Shubham Raj |
requires_python | >=3.11,<4.0 |
license | LICENSE |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
![build](https://github.com/shubhamraj2202/instagram-autoresponder/actions/workflows/ci-test.yml/badge.svg)
[![codecov](https://codecov.io/gh/shubhamraj2202/instagram-autoresponder/branch/main/graph/badge.svg?token=ciJFM9MV99)](https://codecov.io/gh/shubhamraj2202/instagram-autoresponder)
# Instagram Direct Message Autoresponder
This project allows you to automatically respond to direct messages (DMs) on Instagram based on predefined rules. It uses the `instagrapi` library to interact with Instagram's API.
## Features
- Automatic response to incoming direct messages based on predefined rules.
- Configuration settings for auto-reply, check interval, keep-alive duration, and log file path.
- Logs for all messages and responses.
- Test cases using Pytest.
## Installation
1. Clone this repository to your local machine.
2. Install the required dependencies using pip:
pip install -r requirements.txt
## Usage
1. Create a configuration JSON file with your Instagram credentials, rules, and settings. Here's an example configuration:
```json
{
"username": "your_instagram_username",
"password": "your_instagram_password",
"rules": {
"hi|hello|hey": "Hi there! How are you doing?",
"how are you|how r u": "I'm doing well, thanks for asking! How about you?",
"default": "Sorry, I didn't understand that."
},
"settings": {
"auto_reply": true,
"check_interval_seconds": 60,
"keep_alive_minutes": 5,
"log_file": "instagram_bot_logs.txt"
}
}
```
Run the script with the path to your configuration file:
```bash
python run.py --config path/to/your/config.json
````
## Configuration
- `username`: Your Instagram username.
- `password`: Your Instagram password.
- `rules`: Dictionary containing message patterns and corresponding responses.
- `settings`:
- `auto_reply`: Whether to automatically reply to messages. Default is true. if false, it will prompt before confirm sending the response to the user.
- `check_interval_seconds`: Interval (in seconds) to check for new messages. Default is 60.
- `keep_alive_minutes`: Duration (in minutes) to keep the application running. Set to null to run indefinitely.
- `log_file`: Path to the log file. Default is instagram_bot_logs.txt.
## Testing
To run the test cases, use the following command:
```bash
pytest
```
## Disclaimer
Please note that this project utilizes the [instagrapi]([https://github.com/subzeroid/instagrapi) library, which is a third-party tool for interacting with Instagram's API. This is an unofficial tool, and its usage might not be in compliance with Instagram's terms of service. Users should proceed with caution and review Instagram's policies to understand the potential risks, including the possibility of account restrictions or bans for automating direct message responses. This tool is provided "as is", and users should use it at their own risk, ensuring they are aware of and accept the potential implications of using unofficial APIs to interact with Instagram services.
## Additional Advice
Review Instagram's Policy: Before using the autoresponder, it's crucial to review Instagram's Platform Policy and Community Guidelines to ensure compliance and avoid potential violations.
Consider Privacy and Security: Be mindful of the security implications of storing and using Instagram credentials in scripts or applications. Ensure that your implementation follows best practices for data security and privacy.
Stay Updated: Since this relies on an unofficial library, be prepared for the possibility of future changes to Instagram's API affecting the functionality of your autoresponder. Keep the library and your scripts updated and monitor for any announcements from the library maintainers regarding compatibility or new features.
Raw data
{
"_id": null,
"home_page": "",
"name": "instagram-autoresponder",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Shubham Raj",
"author_email": "shubhamraj2202@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d0/7e/c86f2faa52b92e3831032f97a58dd58a7e6e202c0d2bc053423d6092aebb/instagram_autoresponder-0.0.2a2.tar.gz",
"platform": null,
"description": "![build](https://github.com/shubhamraj2202/instagram-autoresponder/actions/workflows/ci-test.yml/badge.svg)\n[![codecov](https://codecov.io/gh/shubhamraj2202/instagram-autoresponder/branch/main/graph/badge.svg?token=ciJFM9MV99)](https://codecov.io/gh/shubhamraj2202/instagram-autoresponder)\n# Instagram Direct Message Autoresponder\n\nThis project allows you to automatically respond to direct messages (DMs) on Instagram based on predefined rules. It uses the `instagrapi` library to interact with Instagram's API.\n\n## Features\n\n- Automatic response to incoming direct messages based on predefined rules.\n- Configuration settings for auto-reply, check interval, keep-alive duration, and log file path.\n- Logs for all messages and responses.\n- Test cases using Pytest.\n\n## Installation\n\n1. Clone this repository to your local machine.\n2. Install the required dependencies using pip:\n pip install -r requirements.txt\n\n## Usage\n\n1. Create a configuration JSON file with your Instagram credentials, rules, and settings. Here's an example configuration:\n\n```json\n{\n \"username\": \"your_instagram_username\",\n \"password\": \"your_instagram_password\",\n \"rules\": {\n \"hi|hello|hey\": \"Hi there! How are you doing?\",\n \"how are you|how r u\": \"I'm doing well, thanks for asking! How about you?\",\n \"default\": \"Sorry, I didn't understand that.\"\n },\n \"settings\": {\n \"auto_reply\": true,\n \"check_interval_seconds\": 60,\n \"keep_alive_minutes\": 5,\n \"log_file\": \"instagram_bot_logs.txt\"\n }\n}\n```\n\nRun the script with the path to your configuration file:\n\n```bash\npython run.py --config path/to/your/config.json\n````\n\n## Configuration\n\n- `username`: Your Instagram username.\n- `password`: Your Instagram password.\n- `rules`: Dictionary containing message patterns and corresponding responses.\n- `settings`:\n - `auto_reply`: Whether to automatically reply to messages. Default is true. if false, it will prompt before confirm sending the response to the user.\n - `check_interval_seconds`: Interval (in seconds) to check for new messages. Default is 60.\n - `keep_alive_minutes`: Duration (in minutes) to keep the application running. Set to null to run indefinitely.\n - `log_file`: Path to the log file. Default is instagram_bot_logs.txt.\n\n## Testing\n\nTo run the test cases, use the following command:\n\n```bash\npytest\n```\n\n## Disclaimer\nPlease note that this project utilizes the [instagrapi]([https://github.com/subzeroid/instagrapi) library, which is a third-party tool for interacting with Instagram's API. This is an unofficial tool, and its usage might not be in compliance with Instagram's terms of service. Users should proceed with caution and review Instagram's policies to understand the potential risks, including the possibility of account restrictions or bans for automating direct message responses. This tool is provided \"as is\", and users should use it at their own risk, ensuring they are aware of and accept the potential implications of using unofficial APIs to interact with Instagram services.\n\n## Additional Advice\nReview Instagram's Policy: Before using the autoresponder, it's crucial to review Instagram's Platform Policy and Community Guidelines to ensure compliance and avoid potential violations.\nConsider Privacy and Security: Be mindful of the security implications of storing and using Instagram credentials in scripts or applications. Ensure that your implementation follows best practices for data security and privacy.\nStay Updated: Since this relies on an unofficial library, be prepared for the possibility of future changes to Instagram's API affecting the functionality of your autoresponder. Keep the library and your scripts updated and monitor for any announcements from the library maintainers regarding compatibility or new features.\n\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "Automatically respond to Instagram direct messages based on predefined rules.",
"version": "0.0.2a2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "767f60e0ab5c981fecbc5d10fdf95a80b649ea49defef35a1c668a9db12b104c",
"md5": "d0d04569fba30839c28d7af3644f4c6c",
"sha256": "57789998ac67f0da9a0f09547d802e01493aed65e0a7ed4d6018f768c573553e"
},
"downloads": -1,
"filename": "instagram_autoresponder-0.0.2a2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d0d04569fba30839c28d7af3644f4c6c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11,<4.0",
"size": 6359,
"upload_time": "2024-02-09T00:53:44",
"upload_time_iso_8601": "2024-02-09T00:53:44.893423Z",
"url": "https://files.pythonhosted.org/packages/76/7f/60e0ab5c981fecbc5d10fdf95a80b649ea49defef35a1c668a9db12b104c/instagram_autoresponder-0.0.2a2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d07ec86f2faa52b92e3831032f97a58dd58a7e6e202c0d2bc053423d6092aebb",
"md5": "bbb7267e32796e5017e563b08e4184ff",
"sha256": "479ed6798fe8ffc7dfd5082efc56aacc70effe4c2b3da6fa0cd7bdf0b35e91e1"
},
"downloads": -1,
"filename": "instagram_autoresponder-0.0.2a2.tar.gz",
"has_sig": false,
"md5_digest": "bbb7267e32796e5017e563b08e4184ff",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11,<4.0",
"size": 4987,
"upload_time": "2024-02-09T00:53:46",
"upload_time_iso_8601": "2024-02-09T00:53:46.486440Z",
"url": "https://files.pythonhosted.org/packages/d0/7e/c86f2faa52b92e3831032f97a58dd58a7e6e202c0d2bc053423d6092aebb/instagram_autoresponder-0.0.2a2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-09 00:53:46",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "instagram-autoresponder"
}