I am trying to understand a Python package called Instaloader and how many requests are actually being made to the Instagram server. With Instaloader, one can create a Profile instance from a given username with the following snippet of code:
loader = Instaloader()
loader.load_session_from_file(login_name)
profile = Profile.from_username(loader.context, target_profile)
Q1. Am I correct in assuming the last line makes a single request to the Instagram server? Am I also correct in assuming I am creating a data object (and not a reference) that is being stored in the "profile" variable?
profile_full_name = profile.full_name
Q2. Am I correct in assuming this does not make a request to the server, but retrieves a parameter from the data object in the profile variable?
followers = profile.get_followers()
Q3. Am I correct in assuming this makes another request to the server and stores the data object in the "followers" variable? The documentation says the return type is "NodeIterator[Profile]". Does this mean I am storing the data object for each profile from the target's followers? Or am I making a reference to each of those profiles?
Q4. If I am storing the data object for each profile, does that mean extracting information from the data object for these profiles will NOT make additional requests to the server? (Because I already have it stored in the "followers" variable?)
Or does it operate as a reference and thus: each moment I extract additional parameters from a follower profile, it will require an additional request to the server?