1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-08-17 20:29:38 +02:00

main: Ignore profile JSON files as target

It might annoy or be undesired when using Instaloader with a globbed
JSON file list, i.e. instaloader profile/*.json to just update all post
metadata.
This commit is contained in:
Alexander Graf 2018-04-29 11:22:56 +02:00
parent 8a8ea2913c
commit 5036cc7b44

View File

@ -109,8 +109,8 @@ def _main(instaloader: Instaloader, targetlist: List[str],
instaloader.context.log("Attempting to download {} ({})".format(structure, target))
instaloader.download_storyitem(structure, os.path.dirname(target))
elif isinstance(structure, Profile):
instaloader.context.log("Going to download {} ({})".format(structure.username, target))
profiles.add(structure.username)
raise InvalidArgumentException("Profile JSON are ignored. Pass \"{}\" to download that profile"
.format(structure.username))
else:
raise InvalidArgumentException("{} JSON file not supported as target"
.format(structure.__class__.__name__))