MCPcopy
hub / github.com/InstaPy/InstaPy / grab_followers

Method grab_followers

instapy/instapy.py:4503–4552  ·  view source on GitHub ↗

Gets and returns `followers` information of given user in desired amount, also, saves locally

(
        self,
        username: str = None,
        amount: int = None,
        live_match: bool = False,
        store_locally: bool = True,
        verified_only: bool = False,
    )

Source from the content-addressed store, hash-verified

4501 self.logger.info("Campaign {} first run".format(campaign))
4502
4503 def grab_followers(
4504 self,
4505 username: str = None,
4506 amount: int = None,
4507 live_match: bool = False,
4508 store_locally: bool = True,
4509 verified_only: bool = False,
4510 ):
4511 """
4512 Gets and returns `followers` information of given user
4513 in desired amount, also, saves locally
4514 """
4515
4516 message = "Starting to get the `Followers` data.."
4517 highlight_print(self.username, message, "feature", "info", self.logger)
4518
4519 if username is None:
4520 self.logger.warning(
4521 "Please provide a username to grab `Followers` data"
4522 " ~e.g. your own username or somebody else's"
4523 )
4524 return self
4525
4526 elif amount is None:
4527 self.logger.warning("Please put amount to grab `Followers` data")
4528 return self
4529
4530 elif amount != "full" and (
4531 type(amount) != int or ((type(amount) == int and amount <= 0))
4532 ):
4533 self.logger.info(
4534 "Please provide a valid amount bigger than"
4535 " zero (0) to grab `Followers` data"
4536 )
4537 return self
4538
4539 # Get `followers` data
4540 grabbed_followers = get_followers(
4541 self.browser,
4542 self.username,
4543 username,
4544 amount,
4545 self.relationship_data,
4546 live_match,
4547 store_locally,
4548 self.logger,
4549 self.logfolder,
4550 verified_only,
4551 )
4552 return grabbed_followers
4553
4554 def grab_following(
4555 self,

Callers

nothing calls this directly

Calls 2

highlight_printFunction · 0.85
get_followersFunction · 0.85

Tested by

no test coverage detected