mirror of
https://github.com/instaloader/instaloader.git
synced 2024-09-11 16:22:24 +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:
parent
8a8ea2913c
commit
5036cc7b44
@ -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__))
|
||||
|
Loading…
Reference in New Issue
Block a user