MCPcopy
hub / github.com/InstaPy/InstaPy / log_follower_num

Function log_follower_num

instapy/print_log_writer.py:15–26  ·  view source on GitHub ↗

Prints and logs the current number of followers to a separate file

(browser, username, logfolder)

Source from the content-addressed store, hash-verified

13
14
15def log_follower_num(browser, username, logfolder):
16 """Prints and logs the current number of followers to
17 a separate file"""
18 user_link = "https://www.instagram.com/{}".format(username)
19 web_address_navigator(browser, user_link)
20
21 followed_by = getUserData("graphql.user.edge_followed_by.count", browser)
22
23 with open("{}followerNum.txt".format(logfolder), "a") as numFile:
24 numFile.write("{:%Y-%m-%d %H:%M} {}\n".format(datetime.now(), followed_by or 0))
25
26 return followed_by
27
28
29def log_following_num(browser, username, logfolder):

Callers 1

loginMethod · 0.85

Calls 2

web_address_navigatorFunction · 0.85
getUserDataFunction · 0.85

Tested by

no test coverage detected