Instagram automation using selenium python code - Instagram automation python code

Instagram automation using selenium python code 

In this blog i will code how you can automate your instagram account using python code and this will guide you every thing about instagram automation . In this automation process we will use python library called as Selenium python code .By this process you can automate other websites as well .

Instagram automation using selenium python code
Instagram automation python code


Need to get more Instagram devotees? Try not to need to make great and connecting with content? This article is for you.

Essentially everybody needs to have more adherents on their virtual entertainment of decision. In the event that you're not able to lay out heaps of cash on purchasing questionable devotees and need to computerize this errand, the best arrangement I found is utilizing Selenium. Selenium is a Python library that robotizes internet browsers. The Instagram Programming interface is purposefully intended to make it almost difficult to cultivate supporters by utilizing it so we need to depend on a few strange arrangements.

We will involve the most seasoned stunt in the book to acquire a few devotees. We are about to follow individuals indiscriminately and trust they follow us back. From some broad testing, that's what I confirmed assuming you are following individuals at arbitrary around 1 of every 10 will follow you back. Not incredible, however not great, but not terrible either than nothing.

In the first place, you will have to set up and introduce the Selenium library. This site and two or three google searches ought to be sufficient to make this ready.


                                                        Following Steps


1 . Import webdriver from selenium 
2 . Import random 
3 . Import keys 
4 . Import time
5 . Create random time function
6 . Give path where your google driver available in pc
7 . Find element of username and password and send key as your account credentials
8 . Find login button reference and click login button 
9 . Find not now button and click 
10 . Find not now of notifications and click not now button again 
11 . Now you are enter and can perform any other function on instagram







                         Here is Complete Code for Instagram automation





from selenium import webdriver
import time
from random import seed
from random import randint

from selenium.webdriver import Keys


def getRandomTime():
randTime = randint(3, 5)
return randTime
username = "03184750663"
password = "samiikhan123"

driver = webdriver.Chrome("E://driver//chromedriver.exe")
driver.get("https://instagram.com")
time.sleep(getRandomTime())
driver.find_element("xpath","//input[@name=\"username\"]") \
.send_keys(username)
driver.find_element("xpath","//input[@name=\"password\"]") \
.send_keys(password)
time.sleep(getRandomTime())
driver.find_element("xpath",'//button[@type="submit"]') \
.click()

time.sleep(getRandomTime())
driver.find_element("xpath","//button[contains(text(),'Not Now')]") \
.click()

time.sleep(getRandomTime())
driver.find_element("xpath","//button[contains(text(),'Not Now')]") \
.click()


time.sleep(getRandomTime())
search2 = driver.find_element("xpath","//span[text(),'Search']")
search2.send_keys('duck._lover')

count=0
while count < 3:
search2.send_keys(Keys.Enter)
count +=1
time.sleep(1)

time.sleep(getRandomTime())
driver.find_element("xpath","//button[contains(text(),'Follow')]") \
.click()

The main strategy behind this is using the automated browsing tools that Selenium provides to log onto your account on the Instagram website, navigate past all of those annoying pop-ups, search the profile of some famous high profile people and just start following people that follow them randomly.

I put random time delays between most of the actions to simulate the randomness of a human user using the website and try and avoid Instagram’s bot detection algorithms.



I hope You really enjoyed this blog . I try my best to make every thing is easy and helpfull to provide to public .You will get more blog about the Programing project and code . Thanks for visiting my blog if you have any querry related to this you can comment here i will try my best to response you back