def from_following_of(self, account_name: str, limit: int) -> "Input": """Retrieves accounts that `account_name` follows. Args: account_name: the account to retrieve from limit: the amount of accounts to retrieve """ following = get_following( self._client, get_user_id_from_username(self._client, account_name), limit) self._accounts.extend(following) return self
from instauto.api.client import ApiClient from instauto.helpers.search import get_user_id_from_username from instauto.helpers.friendships import get_following # Initiate the client client = ApiClient.initiate_from_file('.instauto.save') # Get the user id by doing one of the below user_id = "user_id" user_id = get_user_id_from_username(client, "instagram") # And retrieve 100 users following the user following = get_following(client, user_id, 100)
def collect_new_following(self, count: int) -> List["Account"]: return [ Account(self.client, account_dict) for account_dict in get_following(self.client, self.user_id, count) ]
def from_following_of(self, account_name: str, limit: int) -> "Input": following = get_following(self._client, get_user_id_from_username(self._client, account_name), limit) self.accounts.extend(following) return self