docs/relationship-tools.md
followers of the given user in desired amount, also can save locallypopeye_followers = session.grab_followers(username="Popeye", amount="full", live_match=True, store_locally=True)
##now, `popeye_followers` variable which is a list- holds the `Followers` data of "Popeye" at requested time
username:
A desired username to grab its followers
own username OR a username of some non-private account.amount:
Defines the desired amount of usernames to grab from the given account
amount="full":
amount=3089:
3089 usernames if exist, if not, grabs available amountlive_match:
Defines the method of grabbing Followers data
Knowledge Base: Every time you grab
Followersdata in"full"range of any user, it is also gonna be stored in some corner ofInstaPyfor that session.
live_match=False:
Followers data loaded earlier in the same session, it will run a smart data-matching algorithm.
And there, it will load only the new data from the server and then return a compact result of current data.
The algorithm works like: load the usernames until hits the ones from the previous query at certain amount.live_match is False and the user has no any sessional Followers data, then it will load live data at requested range.live_match=False saves lots of precious time and server requests.live_match=True:
live data from the server at requested range.store_locally:
Gives the option to save the loaded Followers data in a local storage
The files will be saved into your logs folder, ~/InstaPy/logs/YourOwnUsername/relationship_data/Popeye/followers/ directory.
Sample filename 14-06-2018~full~6874.json:
14-06-2018 means the time of the data acquisition."full" means the range of the data acquisition;
If the data is requested at the range else than "full", it will write that range.6874 means the count of the usernames retrieved.json is the filetype and the data is stored as a list in it.verified_only:
Gives the option to only return followers with a Verified status.
verified_only=True:
is_verified keyverified_only=False:
There are several use cases of this tool for various purposes.
E.g., inside your quickstart script, you can do something like this:
#get followers of "Popeye" and "Cinderella"
popeye_followers = session.grab_followers(username="Popeye", amount="full", live_match=True, store_locally=True)
sleep(600)
cinderella_followers = session.grab_followers(username="Cinderella", amount="full", live_match=True, store_locally=True)
#find the users following "Popeye" WHO also follow "Cinderella" :D
popeye_cinderella_followers = [follower for follower in popeye_followers if follower in cinderella_followers]
You can use this tool to take a backup of your or any other user's current followers.
<ins class="adsbygoogle" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4875789012193531" data-ad-slot="9530237054"
</ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
following of the given user in desired amount, also can save locallylazySmurf_following = session.grab_following(username="lazy.smurf", amount="full", live_match=True, store_locally=True)
##now, `lazySmurf_following` variable which is a list- holds the `Following` data of "lazy.smurf" at requested time
username:
A desired username to grab its following
own username OR a username of some non-private account.amount:
Defines the desired amount of usernames to grab from the given account
amount="full":
amount=3089:
3089 usernames if exist, if not, grabs available amountlive_match:
Defines the method of grabbing Following data
Knowledge Base: Every time you grab
Followingdata in"full"range of any user, it is also gonna be stored in some corner ofInstaPyfor that session.
live_match=False:
Following data loaded earlier in the same session, it will run a smart data-matching algorithm.
And there, it will load only the new data from the server and then return a compact result of current data.
The algorithm works like: load the usernames until hits the ones from the previous query at certain amount.live_match is False and the user has no any sessional Following data, then it will load live data at requested range.live_match=False saves lots of precious time and server requests.live_match=True:
live data from the server at requested range.store_locally:
Gives the option to save the loaded Following data in a local storage
The files will be saved into your logs folder, ~/InstaPy/logs/YourOwnUsername/relationship_data/lazy.smurf/following/ directory.
Sample filename 15-06-2018~full~2409.json:
15-06-2018 means the time of the data acquisition."full" means the range of the data acquisition;
If the data is requested at the range else than "full", it will write that range.2409 means the count of the usernames retrieved.json is the filetype and the data is stored as a list in it.There are several use cases of this tool for various purposes.
E.g., inside your quickstart script, you can do something like this:
##as we know that all lazy Smurf care is to take some good rest, so by mistake, he can follow somebody WHOM Gargamel also follow!
#so let's find it out to save Smurfs from troubles! :D
#get following of "lazy.smurf" and "Gargamel"
lazySmurf_following = session.grab_following(username="lazy.smurf", amount="full", live_match=True, store_locally=True)
sleep(600)
gargamel_following = session.grab_following(username="Gargamel", amount="full", live_match=True, store_locally=True)
#find the users "lazy.smurf" is following WHOM "Gargamel" also follow :D
lazySmurf_gargamel_following = [following for following in lazySmurf_following if following in gargamel_following]
You can use this tool to take a backup of your or any other user's current following.
followers stored in a local storage against current followers and returns absent followersall_unfollowers, active_unfollowers = session.pick_unfollowers(username="Bernard_bear", compare_by="month", compare_track="first", live_match=True, store_locally=True, print_out=True)
##now, `all_unfollowers` and `all_unfollowers` variables which are lists- hold the `Unfollowers` data of "Bernard_bear" at requested time
#`all_unfollowers` holds all of the unfollowers WHILST `active_unfollowers` holds the unfollowers WHOM "Bernard_bear" is still following
username:
A desired username to pick its unfollowers
own username OR a username of some non-private account.compare_by:
Defines the compare point to pick unfollowers
Available values are:
"latest" chooses the very latest record from the existing records in the local folder"earliest" chooses the very earliest record from the existing records in the local folderThe compare points below needs a compare track defined, too:
"day" chooses from the existing records of today in the local folder"month" chooses from the existing records of this month in the local folder"year" chooses from the existing records of this year in the local foldercompare_track:
Defines the track to choose a file to compare for "day", "month" and "year" compare points
"first" selects the first record from the given day, month or year"median" selects the median (the one in the middle) record from the given day, month or year"last" selects the last record from the given day, month or yearlive_match:
Defines the method of grabbing new Followers data to compare with existing data
Knowledge Base: Every time you grab
Followersdata in"full"range of any user, it is also gonna be stored in some corner ofInstaPyfor that session.
live_match=False:
Followers data loaded earlier in the same session, it will run a smart data-matching algorithm.
And there, it will load only the new data from the server and then return a compact result of current data.
The algorithm works like: load the usernames until hits the ones from the previous query at certain amount.live_match is False and the user has no any sessional Followers data, then it will load live data at requested range.live_match=False saves lots of precious time and server requests.live_match=True:
live data from the server at requested range.store_locally:
Gives the option to save the loaded Unfollowers data in a local storage
There will be 2 files saved in their own directory:
all_unfollowers:
~/InstaPy/logs/YourOwnUsername/relationship_data/Bernard_bear/unfollowers/all_unfollowers/ directory.active_unfollowers:
~/InstaPy/logs/YourOwnUsername/relationship_data/Bernard_bear/unfollowers/active_unfollowers/ directory.Sample filename 03-06-2018~all~75.json:
03-06-2018 means the time of the data acquisition."all" means that it is all of the unfollowers data;
*"active" unfollowers files will have "active" written in there.75 means the count of the unfollowers retrieved.json is the filetype and the data is stored as a list in it.print_out:
Use this parameter if you would like the see those unfollowers printed into the console output right after finding them.
There are several use cases of this tool for various purposes.
useful analysis with that generated unfollowers data.block them all.active unfollowers right away:#find all of the active unfollowers of Bernard bear
all_unfollowers, active_unfollowers = session.pick_unfollowers(username="Bernard_bear", compare_by="earliest", compare_track="first", live_match=True, store_locally=True, print_out=True)
sleep(200)
#let's unfollow them immediately cos Bernard will be angry if heards about those unfollowers! :D
session.unfollow_users(amount=len(active_unfollowers), customList=(True, active_unfollowers, "all"), style="RANDOM", unfollow_after=None, sleep_delay=600)
<ins class="adsbygoogle" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4875789012193531" data-ad-slot="9530237054"
</ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
Followers data against Following data of a user and returns the Nonfollowers datascoobyDoo_nonfollowers = session.pick_nonfollowers(username="ScoobyDoo", live_match=True, store_locally=True)
#now, `scoobyDoo_nonfollowers` variable which is a list- holds the `Nonfollowers` data of "ScoobyDoo" at requested time
username:
A desired username to pick its nonfollowers
own username OR a username of some non-private account.live_match:
Defines the method of grabbing Followers and Following data to compare with each other to find nonfollowers
Knowledge Base: Every time you grab
Followersand/orFollowingdata in"full"range of any user, it is also gonna be stored in some corner ofInstaPyfor that session.
live_match=False:
Followers and/or Following data loaded earlier in the same session, it will run a smart data-matching algorithm.
And there, it will load only the new data from the server and then return a compact result of current data.
The algorithm works like: load the usernames until hits the ones from the previous query at certain amount.live_match is False and the user has no any sessional Followers and/or Following data, then it will load live data at requested range.live_match=False saves lots of precious time and server requests.live_match=True:
live data from the server at requested range.store_locally:
Gives the option to save the loaded Nonfollowers data in a local storage
The files will be saved into your logs folder, ~/InstaPy/logs/YourOwnUsername/relationship_data/ScoobyDoo/nonfollowers/ directory.
Sample filename 01-06-2018~[5886-3575]~2465.json:
01-06-2018 means the time of the data acquisition.5886 means the count of the followers retrieved.3575 means the count of the following retrieved.2465 means the count of the nonfollowers picked.json is the filetype and the data is stored as a list in it.There are several use cases of this tool for various purposes.
##Scooby Doo always wonders a lot and this time he wonders if there are people Shaggy is following WHO do not follow him back...
shaggy_nonfollowers = session.pick_nonfollowers(username="Shaggy", live_match=True, store_locally=True)
#now Scooby Doo will tell his friend Shaggy about this, who knows, maybe Shaggy will unfollow them all or even add to block :D
smurfette_fans = session.pick_fans(username="Smurfette", live_match=True, store_locally=True)
#now, `smurfette_fans` variable which is a list- holds the `Fans` data of "Smurfette" at requested time
username:
A desired username to pick its fans
own username OR a username of some non-private account.live_match:
Defines the method of grabbing Followers and Following data to compare with each other to find fans
Knowledge Base: Every time you grab
Followersand/orFollowingdata in"full"range of any user, it is also gonna be stored in some corner ofInstaPyfor that session.
live_match=False:
Followers and/or Following data loaded earlier in the same session, it will run a smart data-matching algorithm.
And there, it will load only the new data from the server and then return a compact result of current data.
The algorithm works like: load the usernames until hits the ones from the previous query at certain amount.live_match is False and the user has no any sessional Followers and/or Following data, then it will load live data at requested range.live_match=False saves lots of precious time and server requests.live_match=True:
live data from the server at requested range.store_locally:
Gives the option to save the loaded Fans data in a local storage
The files will be saved into your logs folder, ~/InstaPy/logs/YourOwnUsername/relationship_data/Smurfette/fans/ directory.
Sample filename 05-06-2018~[4591-2575]~3477.json:
05-06-2018 means the time of the data acquisition.4591 means the count of the followers retrieved.2575 means the count of the following retrieved.3477 means the count of the fans picked.json is the filetype and the data is stored as a list in it.There are several use cases of this tool for various purposes.
##Smurfette is so famous in the place and she wonders which smurfs is following her WHOM she doesn't even know of :D
smurfette_fans = session.pick_fans(username="Smurfette", live_match=True, store_locally=True)
#and now, maybe she will follow back some of the smurfs whom she may know :P
Mutual Following data- all of the accounts who do follow the user WHOM user itself also do follow backWinnie_mutualFollowing = session.pick_mutual_following(username="WinnieThePooh", live_match=True, store_locally=True)
#now, `Winnie_mutualFollowing` variable which is a list- holds the `Mutual Following` data of "WinnieThePooh" at requested time
username:
A desired username to pick its mutual following
own username OR a username of some non-private account.live_match:
Defines the method of grabbing Followers and Following data to compare with each other to find mutual following
Knowledge Base: Every time you grab
Followersand/orFollowingdata in"full"range of any user, it is also gonna be stored in some corner ofInstaPyfor that session.
live_match=False:
Followers and/or Following data loaded earlier in the same session, it will run a smart data-matching algorithm.
And there, it will load only the new data from the server and then return a compact result of current data.
The algorithm works like: load the usernames until hits the ones from the previous query at certain amount.live_match is False and the user has no any sessional Followers and/or Following data, then it will load live data at requested range.live_match=False saves lots of precious time and server requests.live_match=True:
live data from the server at requested range.store_locally:
Gives the option to save the loaded Mutual Following data in a local storage
The files will be saved into your logs folder, ~/InstaPy/logs/YourOwnUsername/relationship_data/WinnieThePooh/mutual_following/ directory.
Sample filename 11-06-2018~[3872-2571]~1120.json:
11-06-2018 means the time of the data acquisition.3872 means the count of the followers retrieved.2571 means the count of the following retrieved.1120 means the count of the mutual following picked.json is the filetype and the data is stored as a list in it.There are several use cases of this tool for various purposes.
#Winnie The Pooh is a very friendly guy and almost everybody follows him back, but he wants to be sure about it :D
Winnie_mutual_following = session.pick_mutual_following(username="WinnieThePooh", live_match=True, store_locally=True)
##now, he will write a message to his mutual followers to help him get a new honey pot :>
<ins class="adsbygoogle" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-4875789012193531" data-ad-slot="9530237054"
</ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>