Batch mode¶
instaLooter supports a batch mode for use cases that are more requiring than
just download from a profile once or twice. To use it, you must specify a
batch config file to the CLI. The file is in the Python configuration format,
very close to the Windows INI format.
Format¶
A config file contains at least one section, but can contain more if needed.
A section is organised as shown below, with a header and key-value pairs using
the = sign:
[my section header]
key = value
other_key = other_value
Specifying targets¶
Users can be specified in the users parameter of each section, and hashtags
in the hashtags parameter. Those sections take a key: value pair per line,
where key is the name of the user, and value the path to the directory where
the medias will be downloaded. For instance:
[Video Games]
users =
borderlands: /tmp/borderlands
ffxv: /tmp/ffxv
hashtags =
nierautomata: /tmp/nier
[Music]
users =
perm36 : ~/Music/Perm36
Logging in¶
Each section can be provided with a username and a password parameter:
if none are given, the scraping is done anonymously or using the last session you logged with (through
instaLooter loginfor instance, or the session of the previous section).if only
usernameis given,instaLooterwill interactively ask for the associated password and then login.if both
usernameandpasswordare given, theninstaLooterwill logout from any previous session and login quietly.
Passing parameters¶
Each section can be given the same parameters as the command line:
add-metadataset to True to add metadata to the downloaded images
get-videosset to True to download videos as well as images
jobsthe number of threads to use, defaults to
16templatethe template to use, without quotes, defaults to
{id}videos-onlyset to True to download only videos
quietset to True to hide the progress bar
newset to True to only download new medias
num-to-dlthe number of images to download
dump-jsonset to True to dump metadata in JSON format
dump-onlyset to True to only dump metadata, not downloading anything.
extended-dumpset to True to fetch additional information when dumping metadata.
For instance, to download 3 new videos from #funny and #nsfw:
[Vids]
videos-only = true
new = true
num-to-dl = 3
hashtags =
funny: ~/Videos
nsfw: ~/Videos
Bugs¶
Warning
This feature may not be completely functional yet ! I would say that it is
still in beta, were the whole instaLooter program not in beta too :D.
Please report any bugs caused by this feature to the Github issue tracker, adding the configuration file as an attachment!