Minor doc fixes and improvements

This commit is contained in:
Alexander Graf 2018-08-24 11:38:45 +02:00
parent 584c69d93c
commit b443cc6654
9 changed files with 28 additions and 10 deletions

View File

@ -21,7 +21,7 @@
:: ::
instaloader [--comments] [--geotags] [--stories] [--tagged] instaloader [--comments] [--geotags] [--stories] [--highlights] [--tagged]
[--login YOUR-USERNAME] [--fast-update] [--login YOUR-USERNAME] [--fast-update]
profile | "#hashtag" | :stories | :feed | :saved profile | "#hashtag" | :stories | :feed | :saved

View File

@ -22,3 +22,7 @@ a:hover {
body { body {
font-size: 16px; font-size: 16px;
} }
.versionmodified {
font-size: 14px;
}

View File

@ -144,6 +144,8 @@ Highlights
Bases: :class:`Story` Bases: :class:`Story`
.. versionadded:: 4.1
Profiles Profiles
"""""""" """"""""

View File

@ -71,9 +71,16 @@ Instaloader supports the following targets:
finds it by its unique ID and renames the folder accordingly. finds it by its unique ID and renames the folder accordingly.
Besides the profile's posts, its current profile picture is downloaded. For Besides the profile's posts, its current profile picture is downloaded. For
each profile you download, :option:`--stories` instructs Instaloader to also each profile you download,
**download the user's stories**, and :option:`--tagged` to **download posts
where the user is tagged**. - :option:`--stories`
instructs Instaloader to also **download the user's stories**,
- :option:`--highlights`
to **download highlights of each profile that is downloaded**, and
- :option:`--tagged`
to **download posts where the user is tagged**.
- ``"#hashtag"`` - ``"#hashtag"``
Posts with a certain **hashtag** (the quotes are usually necessary), Posts with a certain **hashtag** (the quotes are usually necessary),

View File

@ -106,6 +106,8 @@ What to Download of each Profile
Do not download regular posts. Do not download regular posts.
.. versionadded:: 4.1
.. option:: --no-profile-pic .. option:: --no-profile-pic
Do not download profile picture. Do not download profile picture.

View File

@ -41,7 +41,7 @@ See :ref:`install` for more options on how to install Instaloader.
:: ::
instaloader [--comments] [--geotags] [--stories] [--tagged] instaloader [--comments] [--geotags] [--stories] [--highlights] [--tagged]
[--login YOUR-USERNAME] [--fast-update] [--login YOUR-USERNAME] [--fast-update]
profile | "#hashtag" | profile | "#hashtag" |
:stories | :feed | :saved :stories | :feed | :saved

View File

@ -18,7 +18,7 @@ def usage_string():
argv0 = os.path.basename(sys.argv[0]) argv0 = os.path.basename(sys.argv[0])
argv0 = "instaloader" if argv0 == "__main__.py" else argv0 argv0 = "instaloader" if argv0 == "__main__.py" else argv0
return """ return """
{0} [--comments] [--geotags] [--stories] [--tagged] {0} [--comments] [--geotags] [--stories] [--highlights] [--tagged]
{2:{1}} [--login YOUR-USERNAME] [--fast-update] {2:{1}} [--login YOUR-USERNAME] [--fast-update]
{2:{1}} profile | "#hashtag" | :stories | :feed | :saved {2:{1}} profile | "#hashtag" | :stories | :feed | :saved
{0} --help""".format(argv0, len(argv0), '') {0} --help""".format(argv0, len(argv0), '')

View File

@ -717,6 +717,8 @@ class Instaloader:
def save_profile_id(self, profile: Profile): def save_profile_id(self, profile: Profile):
""" """
Store ID of profile locally. Store ID of profile locally.
.. versionadded:: 4.0.6
""" """
os.makedirs(self.dirname_pattern.format(profile=profile.username, os.makedirs(self.dirname_pattern.format(profile=profile.username,
target=profile.username), exist_ok=True) target=profile.username), exist_ok=True)

View File

@ -574,7 +574,9 @@ class Profile:
@property @property
def profile_pic_url(self) -> str: def profile_pic_url(self) -> str:
"""Return URL of profile picture""" """Return URL of profile picture
.. versionadded:: 4.0.3"""
try: try:
return self._iphone_struct['hd_profile_pic_url_info']['url'] return self._iphone_struct['hd_profile_pic_url_info']['url']
except (InstaloaderException, KeyError) as err: except (InstaloaderException, KeyError) as err:
@ -889,8 +891,7 @@ class Highlight(Story):
:param context: :class:`InstaloaderContext` instance used for additional queries if necessary. :param context: :class:`InstaloaderContext` instance used for additional queries if necessary.
:param node: Dictionary containing the available information of the highlight as returned by Instagram. :param node: Dictionary containing the available information of the highlight as returned by Instagram.
:param owner: :class:`Profile` instance representing the owner profile of the highlight. :param owner: :class:`Profile` instance representing the owner profile of the highlight.
"""
.. versionadded:: 4.1"""
def __init__(self, context: InstaloaderContext, node: Dict[str, Any], owner: Optional[Profile] = None): def __init__(self, context: InstaloaderContext, node: Dict[str, Any], owner: Optional[Profile] = None):
super().__init__(context, node) super().__init__(context, node)