How to Create Preset Profile Templates with Python
If you're automating website investigations, you probably want your profiles ready to roll immediately – without the hassle of manually selecting an Indigo proxy and importing cookies. Good news: we’ve got a script for that! 🛠️🔥
Why use preset profile templates?
This handy script automates the entire process for you. Here’s what it does:
- Get an Indigo proxy through the API
- Create a profile through the API
- Import cookies into the profile
- Repeat the process, if needed
There is a known UI bug when creating profiles with an Indigo proxy in API: proxy details will appear at the Custom tab. Keep this in mind! 🚨
Customize the script
-
Extract the contents from profile_template.zip into your local folder.
-
Open the file (
.env
) with any text editor. -
Customize the values in your
.env
file:AUTHORIZATION_TOKEN
: your Indigo access tokenPROXY_TYPE
:http
orsocks5
BROWSER_TYPE
:mimic
orstealthfox
PROXY_COUNTRY
: Use the 2-digit convention (e.g.,us
,gb
). You can find a list of country codes here.FOLDER_ID
: Your Indigo folder IDRANGE_START
: First number of profile to be created (used in the profile name)RANGE_END
: Last number of profile to be createdCOOKIE_TYPE
:google
,ebay
,etsy
,bing
,mixed
,facebook
,amazon
, or other
Example
.env
configuration:AUTHORIZATION_TOKEN = <your token string>
# socks5 or http
PROXY_TYPE = socks5
# mimic or stealthfox
BROWSER_TYPE = mimic
# Indigo proxy country
PROXY_COUNTRY = us
FOLDER_ID = <your profile folder ID>
# number of profiles to be created. Will be used in the profile name
RANGE_START = 1
RANGE_END = 6
COOKIE_TYPE = amazon
# list of cookie types: ['google','ebay','etsy','bing','mixed','facebook','amazon']
Run the script
Make sure your Indigo agent is running before starting the script.
- Ensure your agent is running.
- Open the command prompt (Windows) or Terminal (macOS).
- Locate the folder where you extracted the files.
- Run the script using Python:
python profile_template.py
The script will loop through and create multiple profiles if needed. Easy, right? 😎
This is an example of a successful output:
If you run into any issues, double-check the .env
settings and your token, as it might have expired.