Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
aet edited this page Feb 10, 2022 · 1 revision

📤 Export module

Export module is the module that allows you to download the lists of followers / following / mutuals of your target. These lists contains informations about each account, such as instagram id, username, followers count ...

This allows you to do data analysis to get information about your target (check analysis and compare module).


📝 Abstract

📞 To call this module:

sterra export -h
# This will print the help for this export module

👉 To make a basic export

sterra export --ssid SESSIONID --username USERNAME --target {followers|following|both|mutuals}

# You need to login with --ssid|--login-session-id. For more login details, check the login section below.
# --username will be the username of your target (you can also use -id ID if you know the instagram id of your target)
# --target is the list you want to extract (mutuals will be accounts in followers and also in following)

The exportation without express mode is slow. Don't be suprised, and do something else until the process is completed.

💁‍♂️ Choosing you export options

By default, the export format will be in .xlsx, for excel (easier to visualize the data).

sterra export -ssid SSID -u USERNAME -t mutuals --format {excel|csv|json}

You can choose a custom name for your file (if the file is already taken, it will ask for another until it is not a taken one):

sterra export -ssid SSID -u USERNAME -t mutuals --name N

You can also choose the directory to export the file. It will be by default in the module directory > sterra > parts.

sterra export -ssid SSID -u USERNAME -t mutuals --path P

For more informations on --path and destinations, check the history module.


⚡️ Faster requests with express

sterra export -ssid SSID -u USERNAME -t mutuals --express

# --express will send asynchronous requests to retrieve in a fast way the datas.
# If there's more than 109 username in all list that will be scraped, the express mode will be deactivated to avoid blocking.
sterra export -ssid SSID -u USERNAME -t mutuals --express --no-exp-limit
# --no-exp-limit will deactivate this limitation. Don't over use it if you don't want to be swatted by Zuck.

# Instead of using --express, you can use --delay if you don't want to be blocked
# (it takes already a lot of time so if you do, be sure to be ready to wait).
sterra export -ssid SSID -u USERNAME -t mutuals --delay INT

🔑 Login

To make all the requests, you must have an account, otherwise Instagram will never let us make the requests. For this:

# Login with sessionid - https://skylens.io/blog/how-to-find-your-instagram-session-id
sterra export -ssid|--login-session-id SESSIONID

# Login with credentials - It will log to your account, retrieve the sessionid and use it
sterra export -lcrd|--login-credentials USERNAME PASSWORD

🧩 Parts

Since Instagram blocks at a certain point the mass requests sent to get informations on each username in followers | following list, to don't loose what have been scraped, it is exported under "part".
Parts are stored in the module directory > sterra > parts directory.

When this blocking happens, you will get the following message:

RateLimitError: Part exported under PART_ID.

To continue scraping with this part, use the arg -p instead of -t

-p|--part PART_ID
e.g.:
# Write the same argument as before, but replace -t|--target by -p|--part
sterra -ssid SSID -t zuck --part PART_ID

This will, instead of loading an empty list to scrape username's datas, load the part, and add the new data to it.

If the part gets blocked, it won't change of id and the latest data scraped will be added to it.

Like so, you just have to relaunch the exact same command, and this don't spam creation of parts.


🌀 All infos

All infos allows to write extra informations on each accounts (doesn't make additional requests):

Default informations:

ID Username FullName Page Link Biography IsPrivate Followers Count
Following Count Posts Count External Link IsBusiness IsProfessional IsVerified

--all-infos informations:

Default informations Business Adress Business Category Business Contact Method Business Email Business Phone Number Connected Facebook Page
Mutual Followed By Count Has Effects Has Channel Has Clips Has Guide Hide Like and View Count Has joined Recently

You can also, at the opposite, use --only-usernames to export only usernames list, without details.

Clone this wiki locally