diff --git a/docs/basic-usage.rst b/docs/basic-usage.rst index e45fd68..18d97f3 100644 --- a/docs/basic-usage.rst +++ b/docs/basic-usage.rst @@ -84,6 +84,10 @@ Instaloader supports the following targets: All profiles that are followed by ``profile``, i.e. the *followees* of ``profile`` (requires :option:`--login`). +- ``-post`` + The single **post** with the given shortcode. Must be preceeded by ``--`` in + the argument list to not be mistaken as an option flag. + Instaloader goes through all media matching the specified targets and downloads the pictures and videos and their captions. You can specify diff --git a/instaloader/__main__.py b/instaloader/__main__.py index f340c6d..ee4ed70 100644 --- a/instaloader/__main__.py +++ b/instaloader/__main__.py @@ -133,6 +133,8 @@ def _main(instaloader: Instaloader, targetlist: List[str], elif target[0] == '#': instaloader.download_hashtag(hashtag=target[1:], max_count=max_count, fast_update=fast_update, post_filter=post_filter) + elif target[0] == '-': + instaloader.download_post(Post.from_shortcode(instaloader.context, target[1:]), target) elif target == ":feed": instaloader.download_feed_posts(fast_update=fast_update, max_count=max_count, post_filter=post_filter)