Incomplete downloading of instagram followers

Viewed 16

I downloaded instaloader from here. I found the codes here, and I slightly modified it like below:

import os.path
import instaloader

directory = 'c:\\Users\\_Instagram'
os.chdir(directory)

i = 0
filename = "username_%s.txt"
while os.path.exists(filename % i):
    i += 1
file_path = os.path.join(directory, filename)

L = instaloader.Instaloader()

# Login or load session
username = "username"
password = "password"
L.login(username, password)  # (login)

# Obtain profile metadata
profile = instaloader.Profile.from_username(L.context, username)

# Print list of followees
follow_list = []
count = 0

for followee in profile.get_followers():
    follow_list.append(followee.username)
    file = open(filename % i, "a+")
    file.write(follow_list[count])
    file.write("\n")
    file.close()
    count = count + 1
print(count)

It only writes & counts less than 300 followers when the actual followers count is 4000+.

Can someone help me figure out why? I'm using python 3.7.

0 Answers
Related