I have a question related to scraping the instagram followers page. I have a code but it displays only 9 followers. Kindly help me.
from selenium import webdrive
You have to add one for loop so that you can scroll down the page for the followers. This for loop can be like this:
#Find the followers page
dialog = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/div/div[2]')
#find number of followers
allfoll=int(driver.find_element_by_xpath("//li[2]/a/span").text)
#scroll down the page
for i in range(int(allfoll/2)):
driver.execute_script("arguments[0].scrollTop = arguments[0].scrollHeight", dialog)
time.sleep(random.randint(500,1000)/1000)
print("Extract friends %",round((i/(allfoll/2)*100),2),"from","%100")