InstaWebBot


NameInstaWebBot JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/Julius-W/InstaBot
SummaryA simple library for managing an Instagram bot as a web application.
upload_time2023-04-21 22:46:50
maintainer
docs_urlNone
authorJulius-W
requires_python>=3.6
licenseGPL-2.0
keywords python instagram bot automation
VCS
bugtrack_url
requirements selenium
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# InstaBot
InstaBot is a Python library that provides some automation for simple tasks on Instagram like following accounts and sending DMs on Instagram using Selenium. Please note that this library is not associated with Instagram or Meta.

## Installation
You can install the library from the [GitHub repository](https://github.com/Julius-W/InstaBot) or by using pip:

```bash
pip install InstaWebBot
```

## Usage
**_IMPORTANT (version older than 0.3.0):_** The driver file for Selenium must be located in the current working directory of your project. You can download the driver [here](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/). Please provide the driver name if you are not using the recommended geckodriver.

Initialize the bot by passing in your Instagram username and password as parameters:

```py
from InstaWebBot import InstaBot
bot = InstaBot('your_username', 'your_password')

# A bot login is required before any other action will be executed.
bot.login()
```

Here is an example with some optional arguments (using their default value if default exists):

```py
from InstaWebBot import InstaBot

bot = InstaBot('your_username', 'your_password',
               driver="geckodriver",
               output=False,
               time=2.5)
```

To log in to Instagram with the given username and password use

```py
bot.login()
```

Once you have created an instance of the InstaBot class, you can use its methods to automate some simple tasks on Instagram.

## Functions
Search for a username by using

```py
bot.search(query)
```

After that you can perform various actions on a user profile:

```py
bot.follow()
bot.unfollow()
bot.send_dm(message)
bot.get_followers()
bot.get_picture(number)
bot.get_likes()
bot.get_liked_by()
bot.like_picture()
bot.write_comment(message)
```

It is also possible to get data from the profile once it has been searched with `bot.search(query)`:
```py
user_data = bot.get_data('instagram')
# user_data contains various counters as well as a link to the profile picture, homepage and bio
print(f"Follower count of @instagram: {user_data['followers']}")
```

This is a small example program to get 50 followers of a given profile (50 is the maximum amount, because Instagram limits the visibility of followers/following lists):

```py
from InstaWebBot import InstaBot

bot = InstaBot('username', 'password')
bot.login()
bot.search('instagram')
followers = bot.get_followers()
for follower in followers:
    print(follower)
bot.close()
```

## Future functionality:
- [x] Get follower and following counter
- [x] Get post counter
- [x] Allow commenting on posts
- [x] Send direct messages to user
- [ ] Like different images than just the first image
- [ ] Download images
- [ ] Update `.get_data()` function
- [ ] Improve general usability

## LICENSE
InstaBot is licensed under the GNU General Public License v2.0.

## Help & Contribution
If you find an error please feel free to open an issue [here](https://github.com/Julius-W/InstaBot/issues).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Julius-W/InstaBot",
    "name": "InstaWebBot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "python,Instagram,bot,automation",
    "author": "Julius-W",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/9b/36/53fd52189fb865ea8cb0287521c61fcda672a93923a6022d0ea2b2039596/InstaWebBot-0.3.0.tar.gz",
    "platform": null,
    "description": "\r\n# InstaBot\r\nInstaBot is a Python library that provides some automation for simple tasks on Instagram like following accounts and sending DMs on Instagram using Selenium. Please note that this library is not associated with Instagram or Meta.\r\n\r\n## Installation\r\nYou can install the library from the [GitHub repository](https://github.com/Julius-W/InstaBot) or by using pip:\r\n\r\n```bash\r\npip install InstaWebBot\r\n```\r\n\r\n## Usage\r\n**_IMPORTANT (version older than 0.3.0):_** The driver file for Selenium must be located in the current working directory of your project. You can download the driver [here](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/). Please provide the driver name if you are not using the recommended geckodriver.\r\n\r\nInitialize the bot by passing in your Instagram username and password as parameters:\r\n\r\n```py\r\nfrom InstaWebBot import InstaBot\r\nbot = InstaBot('your_username', 'your_password')\r\n\r\n# A bot login is required before any other action will be executed.\r\nbot.login()\r\n```\r\n\r\nHere is an example with some optional arguments (using their default value if default exists):\r\n\r\n```py\r\nfrom InstaWebBot import InstaBot\r\n\r\nbot = InstaBot('your_username', 'your_password',\r\n               driver=\"geckodriver\",\r\n               output=False,\r\n               time=2.5)\r\n```\r\n\r\nTo log in to Instagram with the given username and password use\r\n\r\n```py\r\nbot.login()\r\n```\r\n\r\nOnce you have created an instance of the InstaBot class, you can use its methods to automate some simple tasks on Instagram.\r\n\r\n## Functions\r\nSearch for a username by using\r\n\r\n```py\r\nbot.search(query)\r\n```\r\n\r\nAfter that you can perform various actions on a user profile:\r\n\r\n```py\r\nbot.follow()\r\nbot.unfollow()\r\nbot.send_dm(message)\r\nbot.get_followers()\r\nbot.get_picture(number)\r\nbot.get_likes()\r\nbot.get_liked_by()\r\nbot.like_picture()\r\nbot.write_comment(message)\r\n```\r\n\r\nIt is also possible to get data from the profile once it has been searched with `bot.search(query)`:\r\n```py\r\nuser_data = bot.get_data('instagram')\r\n# user_data contains various counters as well as a link to the profile picture, homepage and bio\r\nprint(f\"Follower count of @instagram: {user_data['followers']}\")\r\n```\r\n\r\nThis is a small example program to get 50 followers of a given profile (50 is the maximum amount, because Instagram limits the visibility of followers/following lists):\r\n\r\n```py\r\nfrom InstaWebBot import InstaBot\r\n\r\nbot = InstaBot('username', 'password')\r\nbot.login()\r\nbot.search('instagram')\r\nfollowers = bot.get_followers()\r\nfor follower in followers:\r\n    print(follower)\r\nbot.close()\r\n```\r\n\r\n## Future functionality:\r\n- [x] Get follower and following counter\r\n- [x] Get post counter\r\n- [x] Allow commenting on posts\r\n- [x] Send direct messages to user\r\n- [ ] Like different images than just the first image\r\n- [ ] Download images\r\n- [ ] Update `.get_data()` function\r\n- [ ] Improve general usability\r\n\r\n## LICENSE\r\nInstaBot is licensed under the GNU General Public License v2.0.\r\n\r\n## Help & Contribution\r\nIf you find an error please feel free to open an issue [here](https://github.com/Julius-W/InstaBot/issues).\r\n",
    "bugtrack_url": null,
    "license": "GPL-2.0",
    "summary": "A simple library for managing an Instagram bot as a web application.",
    "version": "0.3.0",
    "split_keywords": [
        "python",
        "instagram",
        "bot",
        "automation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6e538e24f8a34c38aba26b4f5524e1206b32c9dd4abefd3a6bd10c9d393f9ec2",
                "md5": "645c2e1060abfeb2a0f7bdb4be25e968",
                "sha256": "08c44672d8385117c032ebbcb8a88c34c48d109d51326516c73f0625ea917a53"
            },
            "downloads": -1,
            "filename": "InstaWebBot-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "645c2e1060abfeb2a0f7bdb4be25e968",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 14489,
            "upload_time": "2023-04-21T22:46:48",
            "upload_time_iso_8601": "2023-04-21T22:46:48.309391Z",
            "url": "https://files.pythonhosted.org/packages/6e/53/8e24f8a34c38aba26b4f5524e1206b32c9dd4abefd3a6bd10c9d393f9ec2/InstaWebBot-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9b3653fd52189fb865ea8cb0287521c61fcda672a93923a6022d0ea2b2039596",
                "md5": "c8a8de2d6b353878c3e3e5a2bfabc16b",
                "sha256": "da5cec765930ab5b581c29400f3cc3f0994f0073fb4b4b6950bbb69761bac6bd"
            },
            "downloads": -1,
            "filename": "InstaWebBot-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c8a8de2d6b353878c3e3e5a2bfabc16b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 15339,
            "upload_time": "2023-04-21T22:46:50",
            "upload_time_iso_8601": "2023-04-21T22:46:50.652860Z",
            "url": "https://files.pythonhosted.org/packages/9b/36/53fd52189fb865ea8cb0287521c61fcda672a93923a6022d0ea2b2039596/InstaWebBot-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-21 22:46:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Julius-W",
    "github_project": "InstaBot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "selenium",
            "specs": [
                [
                    "~=",
                    "4.8.0"
                ]
            ]
        }
    ],
    "lcname": "instawebbot"
}
        
Elapsed time: 0.05688s