kandi background
Explore Kits

InstaPy | Instagram Bot - Tool for automated Instagram interactions | Bot library

 by   timgrossmann Python Version: legacy License: GPL-3.0

 by   timgrossmann Python Version: legacy License: GPL-3.0

Download this library from

kandi X-RAY | InstaPy Summary

InstaPy is a Python library typically used in Telecommunications, Media, Advertising, Marketing, Automation, Bot, Selenium applications. InstaPy has no vulnerabilities, it has build file available, it has a Strong Copyleft License and it has medium support. However InstaPy has 10 bugs. You can install using 'pip install InstaPy' or download it from GitHub, PyPI.
Tooling that automates your social media interactions to “farm” Likes, Comments, and Followers on Instagram Implemented in Python using the Selenium module. Twitter of InstaPy | Twitter of Tim | Discord Channel | How it works (FreeCodingCamp) | Talk about automating your Instagram | Talk about doing Open-Source work | Listen to the "Talk Python to me"-Episode.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • InstaPy has a medium active ecosystem.
  • It has 13182 star(s) with 3270 fork(s). There are 671 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 194 open issues and 4986 have been closed. On average issues are closed in 91 days. There are 26 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of InstaPy is legacy
InstaPy Support
Best in #Bot
Average in #Bot
InstaPy Support
Best in #Bot
Average in #Bot

quality kandi Quality

  • InstaPy has 10 bugs (7 blocker, 0 critical, 3 major, 0 minor) and 277 code smells.
InstaPy Quality
Best in #Bot
Average in #Bot
InstaPy Quality
Best in #Bot
Average in #Bot

securitySecurity

  • InstaPy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • InstaPy code analysis shows 0 unresolved vulnerabilities.
  • There are 84 security hotspots that need review.
InstaPy Security
Best in #Bot
Average in #Bot
InstaPy Security
Best in #Bot
Average in #Bot

license License

  • InstaPy is licensed under the GPL-3.0 License. This license is Strong Copyleft.
  • Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.
InstaPy License
Best in #Bot
Average in #Bot
InstaPy License
Best in #Bot
Average in #Bot

buildReuse

  • InstaPy releases are available to install and integrate.
  • Deployable package is available in PyPI.
  • Build file is available. You can build the component from source.
  • InstaPy saves you 5190 person hours of effort in developing the same functionality from scratch.
  • It has 10904 lines of code, 248 functions and 43 files.
  • It has high code complexity. Code complexity directly impacts maintainability of the code.
InstaPy Reuse
Best in #Bot
Average in #Bot
InstaPy Reuse
Best in #Bot
Average in #Bot
Top functions reviewed by kandi - BETA

kandi has reviewed InstaPy and discovered the below as its top functions. This is intended to give you an instant insight into InstaPy implemented functionality, and help decide if they suit your requirements.

  • Creates an unfollow link .
  • validate username
  • Interactively interact by comments
  • Login a browser .
  • Retrieves the list of followers of a given user .
  • Retrieves the following data for a given user .
  • Gets the total number of active users for a given user .
  • Extract the information from the user .
  • Performs a text analysis .
  • Gets users via a DialogQL query .

InstaPy Key Features

📷 Instagram Bot - Tool for automated Instagram interactions

PermissionError: [Errno 13] Permission denied geckodriver.exe

copy iconCopydownload iconDownload
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\User\\InstaPy\\assets\\geckodriver.exe'

Log in to instagram using selenium

copy iconCopydownload iconDownload
//a[text()='Log in']
//div[text()='Log In']/..
login_link = browser.find_element_by_xpath("//div[text()='Log In']/..")
login_link.click()
<div class="            qF0y9          Igw0E     IwRSH      eGOV_         _4EzTm                                                                                                              ">Log In</div>
-----------------------
//a[text()='Log in']
//div[text()='Log In']/..
login_link = browser.find_element_by_xpath("//div[text()='Log In']/..")
login_link.click()
<div class="            qF0y9          Igw0E     IwRSH      eGOV_         _4EzTm                                                                                                              ">Log In</div>
-----------------------
//a[text()='Log in']
//div[text()='Log In']/..
login_link = browser.find_element_by_xpath("//div[text()='Log In']/..")
login_link.click()
<div class="            qF0y9          Igw0E     IwRSH      eGOV_         _4EzTm                                                                                                              ">Log In</div>
-----------------------
//a[text()='Log in']
//div[text()='Log In']/..
login_link = browser.find_element_by_xpath("//div[text()='Log In']/..")
login_link.click()
<div class="            qF0y9          Igw0E     IwRSH      eGOV_         _4EzTm                                                                                                              ">Log In</div>
-----------------------
login_link = browser.find_element_by_xpath("//a[text()='Log in']")
login_link = browser.find_element_by_xpath("//div[contains(text(),'Log In')]")
-----------------------
login_link = browser.find_element_by_xpath("//a[text()='Log in']")
login_link = browser.find_element_by_xpath("//div[contains(text(),'Log In')]")
-----------------------
browser.find_element_by_xpath("//button[@type='submit']").click()

I am looking for a tool that allows me to post to Instagram from python

copy iconCopydownload iconDownload
import requests
import config
import json
def postInstagramQuote():
#Post the Image
    image_location_1 = 'http:path-to-your-image.com/img/image-name.jpg'
    post_url = 'https://graph.facebook.com/v10.0/{}/media'.format(config.ig_user_id)
payload = {
    'image_url': image_location_1,
    'caption': 'Get jobs online on https://careers-portal.co.za #career #hiring #jobs #job #jobssouthafrica #hiringnow,
    'access_token': config.user_access_token
    }
    r = requests.post(post_url, data=payload)
    print(r.text)
result = json.loads(r.text)
    if 'id' in result:
        creation_id = result['id']
second_url = 'https://graph.facebook.com/v10.0/{}/media_publish'.format(config.ig_user_id)
        second_payload = {
        'creation_id': creation_id,
        'access_token': config.user_access_token
        }
        r = requests.post(second_url, data=second_payload)
        print('--------Just posted to instagram--------')
        print(r.text)
    else:
        print('HOUSTON we have a problem')
postInstagramQuote()
-----------------------
import requests
import config
import json
def postInstagramQuote():
#Post the Image
    image_location_1 = 'http:path-to-your-image.com/img/image-name.jpg'
    post_url = 'https://graph.facebook.com/v10.0/{}/media'.format(config.ig_user_id)
payload = {
    'image_url': image_location_1,
    'caption': 'Get jobs online on https://careers-portal.co.za #career #hiring #jobs #job #jobssouthafrica #hiringnow,
    'access_token': config.user_access_token
    }
    r = requests.post(post_url, data=payload)
    print(r.text)
result = json.loads(r.text)
    if 'id' in result:
        creation_id = result['id']
second_url = 'https://graph.facebook.com/v10.0/{}/media_publish'.format(config.ig_user_id)
        second_payload = {
        'creation_id': creation_id,
        'access_token': config.user_access_token
        }
        r = requests.post(second_url, data=second_payload)
        print('--------Just posted to instagram--------')
        print(r.text)
    else:
        print('HOUSTON we have a problem')
postInstagramQuote()

Location of the installed python packages using pip3 on Google colab

copy iconCopydownload iconDownload
import os
import inspect
import instapy

package_path = os.path.dirname(inspect.getfile(instapy))
print(package_path)

Randomly choose one method? attribute error - Python

copy iconCopydownload iconDownload
account_list = ['dji_official' , 'drone', 'dronenerds', 'dronepals']
action_list = [1, 2]
option = random.choice(action_list)
if option == 1:
    session.follow_likers([random.sample(account_list, 2)], photos_grab_amount = 2, follow_likers_per_photo = 15, randomize=True, sleep_delay=25, interact=False)
elif option == 2:
    session.unfollow_users(amount=40, allFollowing=True, style="FIFO", unfollow_after=12*60*60, sleep_delay=15)

Can’t login with InstaPy

copy iconCopydownload iconDownload
from instapy import InstaPy

session = InstaPy(username='', password='')
session.login()

Upload images to instagram using Python

copy iconCopydownload iconDownload
from instabot import Bot

bot = Bot()
bot.login(username="instagram_username", password="your_password")

file = open('path_to_your_image', 'r')
bot.upload_photo(file, caption="your post caption")

Instapy &quot;Invalid Like Element!&quot;

copy iconCopydownload iconDownload
xpath["like_image"] = {
    "like": "//section/span/button/div[*[local-name()='svg']/@aria-label='Like']",
    "unlike": "//section/span/button/div[*[local-name()='svg']/@aria-label='Unlike']",
}
-----------------------
xpath["like_image"] = {
    "like": "//section/span/button[*[local-name()='svg']/@aria-label='Like']",
    "unlike": "//section/span/button[*[local-name()='svg']/@aria-label='Unlike']",
}
xpath["like_image"] = {
    "like": "//section/span/button/div[*[local-name()='svg']/@aria-label='Like']",
    "unlike": "//section/span/button/div[*[local-name()='svg']/@aria-label='Unlike']",
}
-----------------------
xpath["like_image"] = {
    "like": "//section/span/button[*[local-name()='svg']/@aria-label='Like']",
    "unlike": "//section/span/button[*[local-name()='svg']/@aria-label='Unlike']",
}
xpath["like_image"] = {
    "like": "//section/span/button/div[*[local-name()='svg']/@aria-label='Like']",
    "unlike": "//section/span/button/div[*[local-name()='svg']/@aria-label='Unlike']",
}
-----------------------
xpath["like_image"] = {
    "like": "//section/span/button/div/span[*[local-name()='svg']/@aria-label='Like']",
    "unlike": "//section/span/button/div/span[*[local-name()='svg']/@aria-label='Unlike']",
}

The whole App is lagging while loading pictures swift

copy iconCopydownload iconDownload
 let data = try Data(contentsOf: url)

Crontab schedule not running

copy iconCopydownload iconDownload
# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7)
# |  |  |  |  |
# *  *  *  *  *   command to be executed
0 */6 * * * cd /home/david/InstaPy && python3 /yourpath/quickstart.py
chmod +x /path/to/file
0 */6 * * * cd /home/david/InstaPy && /usr/bin/python3 quickstart.py >> /whateverpath/sample.log 2>&1
0 */6 * * * . $HOME/.profile; /path/to/command/to/run
-----------------------
# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7)
# |  |  |  |  |
# *  *  *  *  *   command to be executed
0 */6 * * * cd /home/david/InstaPy && python3 /yourpath/quickstart.py
chmod +x /path/to/file
0 */6 * * * cd /home/david/InstaPy && /usr/bin/python3 quickstart.py >> /whateverpath/sample.log 2>&1
0 */6 * * * . $HOME/.profile; /path/to/command/to/run
-----------------------
# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7)
# |  |  |  |  |
# *  *  *  *  *   command to be executed
0 */6 * * * cd /home/david/InstaPy && python3 /yourpath/quickstart.py
chmod +x /path/to/file
0 */6 * * * cd /home/david/InstaPy && /usr/bin/python3 quickstart.py >> /whateverpath/sample.log 2>&1
0 */6 * * * . $HOME/.profile; /path/to/command/to/run
-----------------------
# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7)
# |  |  |  |  |
# *  *  *  *  *   command to be executed
0 */6 * * * cd /home/david/InstaPy && python3 /yourpath/quickstart.py
chmod +x /path/to/file
0 */6 * * * cd /home/david/InstaPy && /usr/bin/python3 quickstart.py >> /whateverpath/sample.log 2>&1
0 */6 * * * . $HOME/.profile; /path/to/command/to/run
-----------------------
# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7)
# |  |  |  |  |
# *  *  *  *  *   command to be executed
0 */6 * * * cd /home/david/InstaPy && python3 /yourpath/quickstart.py
chmod +x /path/to/file
0 */6 * * * cd /home/david/InstaPy && /usr/bin/python3 quickstart.py >> /whateverpath/sample.log 2>&1
0 */6 * * * . $HOME/.profile; /path/to/command/to/run

Community Discussions

Trending Discussions on InstaPy
  • InstaPy error, can't follow or unfollow users &quot;~user is inaccessible&quot;
  • PermissionError: [Errno 13] Permission denied geckodriver.exe
  • Log in to instagram using selenium
  • I am looking for a tool that allows me to post to Instagram from python
  • Location of the installed python packages using pip3 on Google colab
  • Randomly choose one method? attribute error - Python
  • Can’t login with InstaPy
  • selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
  • Upload images to instagram using Python
  • Instapy &quot;Invalid Like Element!&quot;
Trending Discussions on InstaPy

QUESTION

InstaPy error, can't follow or unfollow users &quot;~user is inaccessible&quot;

Asked 2022-Mar-02 at 16:47

I've installed Instapy dependency from https://pypi.org/project/instapy/ and I really enjoyed it. There are two operations I really can't figure out why it's not working, I've followed the oficial documentation to do it, youtube videos and it isn't working.

Actually the warning message says the user is not acessible, but I don't know why, every user happen this, so I can't unfollow the unfollowers:

INFO [2022-02-11 20:05:41] [gorilafreela]  Ongoing Unfollow [1/3]: now unfollowing 'b'antonio_fpessoa''...
WARNING [2022-02-11 20:06:35] [gorilafreela]  --> Couldn't unfollow 'antonio_fpessoa'!  ~user is inaccessible

The same issue happen if I try to follow someone new, happens the same warning I said before.

import json
from instapy import InstaPy
from instapy import smart_run
import userData
import util
from selenium import webdriver

# data
userInfo = userData.getUserPassword()

# session
session = InstaPy(username=userInfo['user'], password=userInfo['password'])
session.login()

session.unfollow_users(amount=3,nonFollowers=True,unfollow_after=10,sleep_delay=60)
session.end()

Anyone has any ideia how can I fix this problem.

ANSWER

Answered 2022-Feb-14 at 03:23

A fix can be found in the following link

Source https://stackoverflow.com/questions/71087604

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install InstaPy

You can install using 'pip install InstaPy' or download it from GitHub, PyPI.
You can use InstaPy like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

Support

How to install and run InstaPy Installing InstaPy Running Instapy Updating InstaPy Guides and tutorials Video tutorials Written guidesExternals and additionals tools Web InterfaceRunning InstaPy on DockerDocumentation of all Instapy's featuresSupportCredits

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Reuse Pre-built Kits with InstaPy
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.