1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-07-14 23:00:06 +02:00

Minor documentation fixes

This commit is contained in:
Alexander Graf 2017-08-29 12:13:38 +02:00
parent 5b5d540310
commit e143096140
5 changed files with 28 additions and 13 deletions

View File

@ -309,7 +309,7 @@ Then, you may download all pictures of all followees with
.. code:: python
for f in loader.get_followers(PROFILE):
for f in loader.get_followees(PROFILE):
loader.download_profile(f['username'])
You could also download your last 20 liked pics with
@ -325,11 +325,14 @@ To download the last 20 pictures with hashtag #cat, do
loader.download_hashtag('cat', max_count=20)
If logged in, Instaloader is also able to download user stories:
Generally, Instaloader provides methods to iterate over the Posts from
a certain source.
.. code:: python
loader.download_stories()
for post in loader.get_hashtag_posts('cat'):
# post is an instance of instaloader.Post
self.download_post(post, target='#cat')
Each Instagram profile has its own unique ID which stays unmodified even
if a user changes his/her username. To get said ID, given the profile's
@ -345,7 +348,7 @@ get the current username of a profile, given this unique ID
.. code:: python
loader.get_username_by_id(followees[0]['id'])
loader.get_username_by_id(loader.get_followees()[0]['id'])
.. as-module-intro-end

View File

@ -32,6 +32,7 @@ sys.path.insert(0, os.path.abspath('..'))
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx_autodoc_typehints',
'sphinx.ext.githubpages',
]
@ -129,7 +130,10 @@ html_theme = 'alabaster'
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
html_theme_options = {
'show_powered_by': False,
'sidebar_width': '290px',
'page_width': '935px' }
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []

View File

@ -4,3 +4,8 @@ Installation
.. include:: ../README.rst
:start-after: installation-start
:end-before: installation-end
If you do not want to use pip, even though it is highly recommended,
and prefer installing Instaloader manually,
`Download the Source <https://github.com/Thammus/instaloader/releases>`__,
extract the Zip or Tarball and execute ``instaloader.py`` from there.

1
docs/requirements.txt Normal file
View File

@ -0,0 +1 @@
sphinx-autodoc-typehints

View File

@ -1011,11 +1011,12 @@ class Instaloader:
"""
Download pictures from the user's feed.
Example to download up to the 20 pics the user last liked:
>>> loader = Instaloader()
>>> loader.load_session_from_file('USER')
>>> loader.download_feed_posts(max_count=20, fast_update=True,
>>> filter_func=lambda post: post.viewer_has_liked)
Example to download up to the 20 pics the user last liked: ::
loader = Instaloader()
loader.load_session_from_file('USER')
loader.download_feed_posts(max_count=20, fast_update=True,
filter_func=lambda post: post.viewer_has_liked)
:param max_count: Maximum count of pictures to download
:param fast_update: If true, abort when first already-downloaded picture is encountered
@ -1049,9 +1050,10 @@ class Instaloader:
fast_update: bool = False) -> None:
"""Download pictures of one hashtag.
To download the last 30 pictures with hashtag #cat, do
>>> loader = Instaloader()
>>> loader.download_hashtag('cat', max_count=30)
To download the last 30 pictures with hashtag #cat, do ::
loader = Instaloader()
loader.download_hashtag('cat', max_count=30)
:param hashtag: Hashtag to download, without leading '#'
:param max_count: Maximum count of pictures to download