mirror of
https://github.com/instaloader/instaloader.git
synced 2026-10-19 15:12:16 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ae7b23939 | ||
|
|
9dc7456edb | ||
|
|
12d34143c2 | ||
|
|
7862bdb173 | ||
|
|
e143096140 | ||
|
|
5b5d540310 | ||
|
|
d84136b2dd | ||
|
|
fbbbfdf53c | ||
|
|
2dbd510486 | ||
|
|
e748b53b6a | ||
|
|
5aff8273b0 | ||
|
|
1f89dba702 | ||
|
|
90c5cc3c72 | ||
|
|
d7b1e2002d | ||
|
|
ec2e09edcf | ||
|
|
1928db63bb | ||
|
|
ca54088bdc | ||
|
|
1a26d7336c | ||
|
|
bb71c40b56 | ||
|
|
2e47642f74 | ||
|
|
9939eab8ec | ||
|
|
c61d6a93b2 | ||
|
|
bbdd3873e2 | ||
|
|
43bfd6b5ab | ||
|
|
dd99417e7b | ||
|
|
8cf1997460 | ||
|
|
ce38f5880f | ||
|
|
79f143b1f8 | ||
|
|
ad34fc09b6 | ||
|
|
566ef02b94 | ||
|
|
6300c217b3 | ||
|
|
d967400cb4 | ||
|
|
9ee98a2925 | ||
|
|
ee9993d7c2 | ||
|
|
09d2592635 | ||
|
|
0f64768dd8 | ||
|
|
ccdac0305f | ||
|
|
d28bd3ab52 | ||
|
|
4ce6826f82 | ||
|
|
adeb588471 | ||
|
|
57329482f3 | ||
|
|
a894c2d206 | ||
|
|
86fb80d7e4 | ||
|
|
dcc48e37df | ||
|
|
117124d1dd | ||
|
|
0d9af81ae7 | ||
|
|
9eddc03cf1 | ||
|
|
42864997b3 | ||
|
|
58882f508e | ||
|
|
5d83a4ccf6 | ||
|
|
56c8ac729f | ||
|
|
987d95c048 | ||
|
|
9b5d4e34fc | ||
|
|
838ea645a8 | ||
|
|
01fc150e78 | ||
|
|
46ac119a10 | ||
|
|
6b520f6a2d | ||
|
|
c3a5557140 | ||
|
|
0ad50c1526 | ||
|
|
9fbe9b0903 | ||
|
|
4b8b257672 | ||
|
|
b1b90f8abf | ||
|
|
66f69b5c21 | ||
|
|
48d6f0226b | ||
|
|
82ae31cea5 | ||
|
|
3e0b81ad56 | ||
|
|
99620ec766 | ||
|
|
13d288ef36 | ||
|
|
b85e8fd793 | ||
|
|
1699954761 | ||
|
|
7cac6d53f2 | ||
|
|
c355338010 | ||
|
|
2205bbcf45 | ||
|
|
c299e9d1a2 | ||
|
|
151ccfd71d | ||
|
|
bf5e3b90d0 | ||
|
|
56b27fb26f | ||
|
|
8572e527ec | ||
|
|
5068c9453e | ||
|
|
d614d9f015 | ||
|
|
051a6fa9d0 | ||
|
|
169ce1a300 | ||
|
|
ee8e159d56 | ||
|
|
b3f916b371 | ||
|
|
1fdce16f46 | ||
|
|
dd513f7190 | ||
|
|
7198f1ad9f | ||
|
|
58c12d5618 | ||
|
|
1e10ab8669 | ||
|
|
c0eecd1bd2 | ||
|
|
8607135740 | ||
|
|
ca2829becc | ||
|
|
715582138b | ||
|
|
184c521646 | ||
|
|
5ae3d7090f | ||
|
|
4768fdbd10 | ||
|
|
591dfd31e4 | ||
|
|
caf75a8135 | ||
|
|
52492456ed | ||
|
|
e0924e8d08 | ||
|
|
655dbb552d | ||
|
|
fdb8e94c64 | ||
|
|
b3c83f420c | ||
|
|
df00e2b03a | ||
|
|
b60f0b4836 | ||
|
|
35e71192c5 | ||
|
|
2106c2d5f6 | ||
|
|
0e943189e5 | ||
|
|
8e77a1c125 | ||
|
|
361445519a | ||
|
|
6b345e1f52 | ||
|
|
c841bca81b | ||
|
|
3e1360160d | ||
|
|
a7d1c5bbb0 | ||
|
|
dc748a0541 | ||
|
|
72c647829a | ||
|
|
0a039b9c8c | ||
|
|
b1014bfbfd | ||
|
|
d246268630 | ||
|
|
23a0e32e8e | ||
|
|
597e5977b2 | ||
|
|
00f6f47fa9 | ||
|
|
61711f3b6d | ||
|
|
be477e8a88 | ||
|
|
02509d3c40 | ||
|
|
6e3c13b5d3 | ||
|
|
84c2a823c4 | ||
|
|
f2660f7c02 | ||
|
|
73f85b3316 | ||
|
|
86f8b2f018 |
@@ -1,4 +1 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
build/
|
|
||||||
dist/
|
|
||||||
instaloader.egg-info/
|
|
||||||
|
|||||||
+12
-3
@@ -1,11 +1,20 @@
|
|||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.3"
|
|
||||||
- "3.4"
|
|
||||||
- "3.5"
|
- "3.5"
|
||||||
- "3.5-dev"
|
- "3.5-dev"
|
||||||
|
- "3.6"
|
||||||
|
- "3.6-dev"
|
||||||
|
- "3.7-dev"
|
||||||
- "nightly"
|
- "nightly"
|
||||||
install:
|
install:
|
||||||
- pip install pylint requests
|
- pip install pylint requests
|
||||||
script:
|
script:
|
||||||
- python3 -m pylint -r n -d bad-whitespace,bad-continuation,missing-docstring,multiple-imports,too-many-arguments,locally-disabled instaloader
|
- python3 -m pylint -r n -d bad-whitespace,missing-docstring,too-many-arguments,locally-disabled,line-too-long,too-many-public-methods,too-many-lines,too-many-instance-attributes,too-many-locals,too-many-branches,too-many-statements instaloader
|
||||||
|
deploy:
|
||||||
|
provider: pypi
|
||||||
|
user: aandergr
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
python: 3.6
|
||||||
|
password:
|
||||||
|
secure: KBsATtXNnEzqr0X2ALdyx2zaYj2EUfK8YjP4jEOilBELpJ4evHYXVgRkn9CKXGsD7LKbWmR3gz2rr8NZ6U42pHw0fpQHizz91MpJSKbNY7RZZh4UVWMDh81izeglchWAF+m3Wdpxpo/GBDbrZIbRQFhPgB+kjSzJo3uiCS+yVXtGG+6csJHzd0WkJjsVHz+XSdxyOiLy/qFF3nmY6ZrVrgw6WbX2YLbx9je6DxK3YRrnBqgMgH7Ui2xWWbgJCk3KKpQTMiMKnTa9mdeMJAd26YMCz1gG/X7ck6VNly/6bs5+Zq7/bU0dSolhPBhNthyccYdS0IeGPdPF3YqatblJ4fLGTfHn8oJs3/T11yIW9pvOT3UftEynPOUX+en2Qnb/3WfgwUfVts8i8DAYgEFLGEzbF5XMGy4gwAD/bZ0JW0pmgAG2PZsdOokAt+ydlNj/uxq1GFW2doZbul6k4t03p1mik6itYscvuhKoEm8Yw6wr1P9aDvMR6FFpSu4gDt2XrKmRmWkSXxpNeCfZujTjyAnISxLVQGSY7BG5K0Z2HbDtqqNz9nj4WgNGzZmngiRofCevWR+vPIDUDW7NCX03csfcFS9RRllBO/BrL7NVUV+Qp9dfTQYp+8SqYLWgHtDoXdgyMREjJaAmbx2u/TYTY8bADZ5F3vGUpv2j5hP3NTU=
|
||||||
|
|||||||
+279
-56
@@ -1,43 +1,41 @@
|
|||||||
Instaloader
|
Instaloader
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
instaloader is written in Python, thus ensure having
|
.. installation-start
|
||||||
`Python <https://www.python.org/>`__ (at least version 3.3) installed.
|
|
||||||
|
|
||||||
If you intend to use this tool under Windows, it is recommended
|
Instaloader requires `Python <https://www.python.org/>`__, at least
|
||||||
to install
|
version 3.5. If you have `pip <https://pypi.python.org/pypi/pip>`__
|
||||||
`win-unicode-console <https://pypi.python.org/pypi/win_unicode_console>`__.
|
installed, you may install Instaloader using
|
||||||
|
|
||||||
If you have `pip <https://pypi.python.org/pypi/pip>`__ installed, you
|
|
||||||
may install instaloader using
|
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
pip3 install instaloader
|
pip3 install instaloader
|
||||||
|
|
||||||
Alternatively, you may `download instaloader from
|
Alternatively, to get the most current version of Instaloader from our
|
||||||
github <https://github.com/Thammus/instaloader/releases>`__, unzip it
|
`Git repository <https://github.com/Thammus/instaloader>`__:
|
||||||
and invoke bundled ``setup.py`` (requiring
|
|
||||||
`setuptools <https://pypi.python.org/pypi/setuptools>`__) to install it:
|
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
python3 setup.py install [--user]
|
pip3 install git+https://github.com/Thammus/instaloader
|
||||||
|
|
||||||
(pass ``--user`` to install it for your user only instead of globally)
|
(pass ``--upgrade`` to upgrade if Instaloader is already installed)
|
||||||
|
|
||||||
instaloader requires
|
Instaloader requires
|
||||||
`requests <https://pypi.python.org/pypi/requests>`__, which
|
`requests <http://python-requests.org/>`__, which
|
||||||
will be installed automatically by setup.py, if not already installed.
|
will be installed automatically, if it is not already installed.
|
||||||
|
|
||||||
How to automatically download pictures from Instagram
|
.. installation-end
|
||||||
|
|
||||||
|
How to Automatically Download Pictures from Instagram
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
|
|
||||||
To download a set of profiles, do
|
.. basic-usage-start
|
||||||
|
|
||||||
|
To **download all pictures and videos of a profile**, as well as the
|
||||||
|
**profile picture**, do
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
@@ -46,14 +44,16 @@ To download a set of profiles, do
|
|||||||
where ``profile`` is the name of a profile you want to download. Instead
|
where ``profile`` is the name of a profile you want to download. Instead
|
||||||
of only one profile, you may also specify a list of profiles.
|
of only one profile, you may also specify a list of profiles.
|
||||||
|
|
||||||
To later update your local copy of that profile, you may run
|
To later **update your local copy** of that profiles, you may run
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
instaloader --fast-update profile [profile ...]
|
instaloader --fast-update profile [profile ...]
|
||||||
|
|
||||||
When ``--fast-update`` is given, instaloder terminates when arriving at
|
If ``--fast-update`` is given, Instaloader stops when arriving at the
|
||||||
the first already-downloaded picture.
|
first already-downloaded picture. When updating profiles, Instaloader
|
||||||
|
automatically **detects profile name changes** and renames the target
|
||||||
|
directory accordingly.
|
||||||
|
|
||||||
Instaloader can also be used to **download private profiles**. To do so,
|
Instaloader can also be used to **download private profiles**. To do so,
|
||||||
invoke it with
|
invoke it with
|
||||||
@@ -62,64 +62,277 @@ invoke it with
|
|||||||
|
|
||||||
instaloader --login=your_username profile [profile ...]
|
instaloader --login=your_username profile [profile ...]
|
||||||
|
|
||||||
When invoked like this, it also **stores the session cookies** in a file
|
When logging in, Instaloader **stores the session cookies** in a file in
|
||||||
in ``/tmp``, which will be reused later when ``--login`` is given. So
|
your temporary directory, which will be reused later the next time
|
||||||
you can download private profiles **non-interactively** when you already
|
``--login`` is given. So you can download private profiles
|
||||||
have a valid session cookie file.
|
**non-interactively** when you already have a valid session cookie file.
|
||||||
|
|
||||||
If you want to **download all followees of a given profile**, call
|
What to Download
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Instaloader does not only download media by-profile. More generally, you
|
||||||
|
may specify the following targets:
|
||||||
|
|
||||||
|
- ``profile``: Public profile, or private profile with ``--login``,
|
||||||
|
|
||||||
|
- ``"#hashtag"``: Posts with a certain **hashtag** (the quotes are
|
||||||
|
usually neccessary),
|
||||||
|
|
||||||
|
- ``:stories``: The currently-visible **stories** of your followees
|
||||||
|
(requires ``--login``),
|
||||||
|
|
||||||
|
- ``:feed``: Your **feed** (requires ``--login``),
|
||||||
|
|
||||||
|
- ``@profile``: All profiles that are followed by ``profile``, i.e. the
|
||||||
|
*followees* of ``profile`` (requires ``--login``).
|
||||||
|
|
||||||
|
Instaloader goes through all media matching the specified targets and
|
||||||
|
downloads the pictures and videos and their captions. You can specify
|
||||||
|
``--comments`` to also **download comments** of each post and
|
||||||
|
``--geotags`` to **download geotags** of each post and save them as
|
||||||
|
Google Maps link. For each profile you download, ``--stories``
|
||||||
|
instructs Instaloader to **download the user's stories**.
|
||||||
|
|
||||||
|
Filename Specification
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
For each target, Instaloader creates a directory named after the target,
|
||||||
|
i.e. ``profile``, ``#hashtag``, ``:feed``, etc. and therein saves the
|
||||||
|
posts in files named after the post's timestamp.
|
||||||
|
|
||||||
|
``--dirname-pattern`` allows to configure the directory name of each
|
||||||
|
target. The default is ``--dirname-pattern={target}``. In the dirname
|
||||||
|
pattern, the token ``{target}`` is replaced by the target name, and
|
||||||
|
``{profile}`` is replaced by the owner of the post which is downloaded.
|
||||||
|
|
||||||
|
``--filename-pattern`` configures the path of the post's files relative
|
||||||
|
to the target directory. The default is ``--filename-pattern={date}``.
|
||||||
|
The tokens ``{target}`` and ``{profile}`` are replaced like in the
|
||||||
|
dirname pattern. Further, the tokens ``{date}`` and ``{shortcode}`` are
|
||||||
|
defined.
|
||||||
|
|
||||||
|
For example, encode the poster's profile name in the filenames with:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
instaloader --login=your_username @profile
|
instaloader --filename-pattern={date}_{profile} "#hashtag"
|
||||||
|
|
||||||
To **download all the pictures from your feed which you have liked**, call
|
The pattern string is formatted with Python's string formatter. This
|
||||||
|
gives additional flexibilty for pattern specification. For example,
|
||||||
|
`strftime-style formatting options <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior>`__
|
||||||
|
are supported for the post's
|
||||||
|
timestamp. The default for ``{date}`` is ``{date:%Y-%m-%d_%H-%M-%S}``.
|
||||||
|
|
||||||
|
Filter Posts
|
||||||
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The ``--only-if`` option allows to specify criterias that posts have to
|
||||||
|
meet to be downloaded. If not given, all posts are downloaded. It must
|
||||||
|
be a boolean Python expression where the variables ``likes``,
|
||||||
|
``comments``, ``viewer_has_liked``, ``is_video``, and many
|
||||||
|
more are defined.
|
||||||
|
|
||||||
|
A few examples:
|
||||||
|
|
||||||
|
To **download the pictures from your feed that you have liked**:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
instaloader --login=your_username :feed-liked
|
instaloader --login=your_username --only-if=viewer_has_liked :feed
|
||||||
|
|
||||||
The ``--quiet`` option makes it also **suitable as a cron job**.
|
Or you might only want to download **posts that either you liked or were
|
||||||
|
liked by many others**:
|
||||||
|
|
||||||
To get a list of other helpful flags, run ``instaloader --help``.
|
::
|
||||||
|
|
||||||
Usage as library
|
instaloader --login=your_username --only-if="likes>100 or viewer_has_liked" profile
|
||||||
|
|
||||||
|
Or you may **skip videos**:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
instaloader --only-if="not is_video" target
|
||||||
|
|
||||||
|
Or you may filter by hashtags that occur in the Post's caption. For
|
||||||
|
example, to download posts of kittens that are cute: ::
|
||||||
|
|
||||||
|
instaloader --only-if="'cute' in caption_hashtags" "#kitten"
|
||||||
|
|
||||||
|
.. basic-usage-end
|
||||||
|
|
||||||
|
(For a more complete description of the ``-only-if`` option, refer to
|
||||||
|
the `Instaloader Documentation <https://instaloader.readthedocs.io/basic-usage.html#filter-posts>`__)
|
||||||
|
|
||||||
|
|
||||||
|
Advanced Options
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
You may also use parts of instaloader as library to do other interesting
|
.. cli-options-start
|
||||||
|
|
||||||
|
The following flags can be given to Instaloader to specify how profiles should
|
||||||
|
be downloaded.
|
||||||
|
|
||||||
|
To get a list of all flags, their abbreviations and their descriptions, you may
|
||||||
|
run ``instaloader --help``.
|
||||||
|
|
||||||
|
What to Download
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Specify a list of profiles or #hashtags. For each of these, Instaloader
|
||||||
|
creates a folder and downloads all posts along with the pictures's
|
||||||
|
captions and the current **profile picture**. If an already-downloaded profile
|
||||||
|
has been renamed, Instaloader automatically **finds it by its unique ID** and
|
||||||
|
renames the folder likewise.
|
||||||
|
|
||||||
|
Instead of a *profile* or a *#hashtag*, the special targets
|
||||||
|
``:feed`` (pictures from your feed) and
|
||||||
|
``:stories`` (stories of your followees) can be specified.
|
||||||
|
|
||||||
|
--profile-pic-only Only download profile picture.
|
||||||
|
--no-videos Do not download videos.
|
||||||
|
--geotags **Download geotags** when available. Geotags are stored as
|
||||||
|
a text file with the location's name and a Google Maps
|
||||||
|
link. This requires an additional request to the
|
||||||
|
Instagram server for each picture, which is why it is
|
||||||
|
disabled by default.
|
||||||
|
--no-geotags Do not store geotags, even if they can be obtained
|
||||||
|
without any additional request.
|
||||||
|
--comments Download and update comments for each post. This
|
||||||
|
requires an additional request to the Instagram server
|
||||||
|
for each post, which is why it is disabled by default.
|
||||||
|
--no-captions Do not store media captions, although no additional
|
||||||
|
request is needed to obtain them.
|
||||||
|
--stories Also **download stories** of each profile that is
|
||||||
|
downloaded. Requires ``--login``.
|
||||||
|
--stories-only Rather than downloading regular posts of each
|
||||||
|
specified profile, only download stories.
|
||||||
|
Requires ``--login``.
|
||||||
|
--only-if filter Expression that, if given, must evaluate to True for each post to
|
||||||
|
be downloaded. Must be a syntactically valid python
|
||||||
|
expression. Variables are evaluated to
|
||||||
|
``instaloader.Post`` attributes.
|
||||||
|
Example: ``--only-if=viewer_has_liked``.
|
||||||
|
|
||||||
|
|
||||||
|
When to Stop Downloading
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If none of these options are given, Instaloader goes through all pictures
|
||||||
|
matching the specified targets.
|
||||||
|
|
||||||
|
--fast-update For each target, stop when encountering the first
|
||||||
|
already-downloaded picture. This flag is recommended
|
||||||
|
when you use Instaloader to update your personal
|
||||||
|
Instagram archive.
|
||||||
|
--count COUNT Do not attempt to download more than COUNT posts.
|
||||||
|
Applies only to ``#hashtag``, ``:feed-all`` and ``:feed-liked``.
|
||||||
|
|
||||||
|
|
||||||
|
Login (Download Private Profiles)
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Instaloader can **login to Instagram**. This allows downloading private
|
||||||
|
profiles. To login, pass the ``--login`` option. Your session cookie (not your
|
||||||
|
password!) will be saved to a local file to be reused next time you want
|
||||||
|
Instaloader to login.
|
||||||
|
|
||||||
|
--login YOUR-USERNAME Login name (profile name) for your Instagram account.
|
||||||
|
--sessionfile SESSIONFILE Path for loading and storing session key file.
|
||||||
|
Defaults to a path
|
||||||
|
within your temporary directory, encoding your local
|
||||||
|
username and your Instagram profile name.
|
||||||
|
--password YOUR-PASSWORD Password for your Instagram account. Without this
|
||||||
|
option, you'll be prompted for your password
|
||||||
|
interactively if there is not yet a valid session
|
||||||
|
file.
|
||||||
|
|
||||||
|
How to Download
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
--dirname-pattern DIRNAME_PATTERN
|
||||||
|
Name of directory where to store posts. ``{profile}``
|
||||||
|
is replaced by the profile name, ``{target}`` is replaced
|
||||||
|
by the target you specified, i.e. either ``:feed``,
|
||||||
|
``#hashtag`` or the profile name. Defaults to ``{target}``.
|
||||||
|
--filename-pattern FILENAME_PATTERN
|
||||||
|
Prefix of filenames. Posts are stored in the
|
||||||
|
directory whose pattern is given with ``--dirname-pattern``.
|
||||||
|
``{profile}`` is replaced by the profile name,
|
||||||
|
``{target}`` is replaced by the target you specified, i.e.
|
||||||
|
either ``:feed``, ``#hashtag`` or the profile name. Also, the
|
||||||
|
fields ``{date}`` and ``{shortcode}`` can be specified.
|
||||||
|
Defaults to ``{date:%Y-%m-%d_%H-%M-%S}``.
|
||||||
|
--user-agent USER_AGENT User Agent to use for HTTP requests. Per default,
|
||||||
|
Instaloader pretends being Chrome/51.
|
||||||
|
|
||||||
|
Miscellaneous Options
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
--quiet Disable user interaction, i.e. do not print messages
|
||||||
|
(except errors) and fail if login credentials are
|
||||||
|
needed but not given. This makes Instaloader
|
||||||
|
**suitable as a cron job**.
|
||||||
|
|
||||||
|
.. cli-options-end
|
||||||
|
|
||||||
|
Usage as Python module
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
.. as-module-intro-start
|
||||||
|
|
||||||
|
You may also use parts of Instaloader as library to do other interesting
|
||||||
things.
|
things.
|
||||||
|
|
||||||
For example, to get a list of all followers of a profile as well as
|
For example, to get a list of all followees and a list of all followers of a profile, do
|
||||||
their follower count, do
|
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
import instaloader
|
import instaloader
|
||||||
|
|
||||||
# login
|
# Get instance
|
||||||
session = instaloader.get_logged_in_session(USERNAME)
|
loader = instaloader.Instaloader()
|
||||||
|
|
||||||
# get followees
|
# Login
|
||||||
followees = instaloader.get_followees(PROFILE, session)
|
loader.interactive_login(USERNAME)
|
||||||
for f in followees:
|
|
||||||
print("%i\t%s\t%s" % (f['follower_count'], f['username'], f['full_name']))
|
# Print followees
|
||||||
|
print(PROFILE + " follows these profiles:")
|
||||||
|
for f in loader.get_followees(PROFILE):
|
||||||
|
print("\t%s\t%s" % (f['username'], f['full_name']))
|
||||||
|
|
||||||
|
# Print followers
|
||||||
|
print("Followers of " + PROFILE + ":")
|
||||||
|
for f in loader.get_followers(PROFILE):
|
||||||
|
print("\t%s\t%s" % (f['username'], f['full_name']))
|
||||||
|
|
||||||
Then, you may download all pictures of all followees with
|
Then, you may download all pictures of all followees with
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
for f in followees:
|
for f in loader.get_followees(PROFILE):
|
||||||
try:
|
loader.download_profile(f['username'])
|
||||||
instaloader.download(f['username'], session)
|
|
||||||
except instaloader.NonfatalException:
|
|
||||||
pass
|
|
||||||
|
|
||||||
You could also download your last 20 liked pics with
|
You could also download your last 20 liked pics with
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
instaloader.download_feed_pics(session, max_count=20, fast_update=True,
|
loader.download_feed_posts(max_count=20, fast_update=True,
|
||||||
filter_func=lambda node: not node["likes"]["viewer_has_liked"])
|
filter_func=lambda post: post.viewer_has_liked)
|
||||||
|
|
||||||
|
To download the last 20 pictures with hashtag #cat, do
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
|
loader.download_hashtag('cat', max_count=20)
|
||||||
|
|
||||||
|
Generally, Instaloader provides methods to iterate over the Posts from
|
||||||
|
a certain source.
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
|
for post in loader.get_hashtag_posts('cat'):
|
||||||
|
# post is an instance of instaloader.Post
|
||||||
|
loader.download_post(post, target='#cat')
|
||||||
|
|
||||||
Each Instagram profile has its own unique ID which stays unmodified even
|
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
|
if a user changes his/her username. To get said ID, given the profile's
|
||||||
@@ -127,12 +340,22 @@ name, you may call
|
|||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
instaloader.get_id_by_username(PROFILE_NAME)
|
loader.get_id_by_username(PROFILE_NAME)
|
||||||
|
|
||||||
``get_followees()`` also returns unique IDs for all loaded followees. To
|
.. as-module-intro-end
|
||||||
get the current username of a profile, given this unique ID
|
|
||||||
``get_username_by_id()`` can be used. For example:
|
|
||||||
|
|
||||||
.. code:: python
|
Refer to the
|
||||||
|
`Instaloader Documentation <https://instaloader.readthedocs.io/as-module.html>`__ for
|
||||||
|
more information.
|
||||||
|
|
||||||
instaloader.get_username_by_id(session, followees[0]['id'])
|
Disclaimer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. disclaimer-start
|
||||||
|
|
||||||
|
Instaloader is in no way affiliated with, authorized, maintained or endorsed by Instagram or any of its affiliates or
|
||||||
|
subsidiaries. This is an independent and unofficial project. Use at your own risk.
|
||||||
|
|
||||||
|
.. disclaimer-end
|
||||||
|
|
||||||
|
Instaloader is licensed under an MIT license. Refer to ``LICENSE`` file for more information.
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
_build/
|
||||||
+225
@@ -0,0 +1,225 @@
|
|||||||
|
# Makefile for Sphinx documentation
|
||||||
|
#
|
||||||
|
|
||||||
|
# You can set these variables from the command line.
|
||||||
|
SPHINXOPTS =
|
||||||
|
SPHINXBUILD = sphinx-build
|
||||||
|
PAPER =
|
||||||
|
BUILDDIR = _build
|
||||||
|
|
||||||
|
# Internal variables.
|
||||||
|
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||||
|
PAPEROPT_letter = -D latex_paper_size=letter
|
||||||
|
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||||
|
# the i18n builder cannot share the environment and doctrees with the others
|
||||||
|
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||||
|
|
||||||
|
.PHONY: help
|
||||||
|
help:
|
||||||
|
@echo "Please use \`make <target>' where <target> is one of"
|
||||||
|
@echo " html to make standalone HTML files"
|
||||||
|
@echo " dirhtml to make HTML files named index.html in directories"
|
||||||
|
@echo " singlehtml to make a single large HTML file"
|
||||||
|
@echo " pickle to make pickle files"
|
||||||
|
@echo " json to make JSON files"
|
||||||
|
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||||
|
@echo " qthelp to make HTML files and a qthelp project"
|
||||||
|
@echo " applehelp to make an Apple Help Book"
|
||||||
|
@echo " devhelp to make HTML files and a Devhelp project"
|
||||||
|
@echo " epub to make an epub"
|
||||||
|
@echo " epub3 to make an epub3"
|
||||||
|
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||||
|
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||||
|
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
||||||
|
@echo " text to make text files"
|
||||||
|
@echo " man to make manual pages"
|
||||||
|
@echo " texinfo to make Texinfo files"
|
||||||
|
@echo " info to make Texinfo files and run them through makeinfo"
|
||||||
|
@echo " gettext to make PO message catalogs"
|
||||||
|
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||||
|
@echo " xml to make Docutils-native XML files"
|
||||||
|
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||||
|
@echo " linkcheck to check all external links for integrity"
|
||||||
|
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||||
|
@echo " coverage to run coverage check of the documentation (if enabled)"
|
||||||
|
@echo " dummy to check syntax errors of document sources"
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf $(BUILDDIR)/*
|
||||||
|
|
||||||
|
.PHONY: html
|
||||||
|
html:
|
||||||
|
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||||
|
|
||||||
|
.PHONY: dirhtml
|
||||||
|
dirhtml:
|
||||||
|
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||||
|
|
||||||
|
.PHONY: singlehtml
|
||||||
|
singlehtml:
|
||||||
|
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||||
|
|
||||||
|
.PHONY: pickle
|
||||||
|
pickle:
|
||||||
|
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||||
|
@echo
|
||||||
|
@echo "Build finished; now you can process the pickle files."
|
||||||
|
|
||||||
|
.PHONY: json
|
||||||
|
json:
|
||||||
|
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||||
|
@echo
|
||||||
|
@echo "Build finished; now you can process the JSON files."
|
||||||
|
|
||||||
|
.PHONY: htmlhelp
|
||||||
|
htmlhelp:
|
||||||
|
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||||
|
@echo
|
||||||
|
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||||
|
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||||
|
|
||||||
|
.PHONY: qthelp
|
||||||
|
qthelp:
|
||||||
|
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||||
|
@echo
|
||||||
|
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||||
|
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||||
|
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Instaloader.qhcp"
|
||||||
|
@echo "To view the help file:"
|
||||||
|
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Instaloader.qhc"
|
||||||
|
|
||||||
|
.PHONY: applehelp
|
||||||
|
applehelp:
|
||||||
|
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
|
||||||
|
@echo "N.B. You won't be able to view it unless you put it in" \
|
||||||
|
"~/Library/Documentation/Help or install it in your application" \
|
||||||
|
"bundle."
|
||||||
|
|
||||||
|
.PHONY: devhelp
|
||||||
|
devhelp:
|
||||||
|
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||||
|
@echo
|
||||||
|
@echo "Build finished."
|
||||||
|
@echo "To view the help file:"
|
||||||
|
@echo "# mkdir -p $$HOME/.local/share/devhelp/Instaloader"
|
||||||
|
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Instaloader"
|
||||||
|
@echo "# devhelp"
|
||||||
|
|
||||||
|
.PHONY: epub
|
||||||
|
epub:
|
||||||
|
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||||
|
|
||||||
|
.PHONY: epub3
|
||||||
|
epub3:
|
||||||
|
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
|
||||||
|
|
||||||
|
.PHONY: latex
|
||||||
|
latex:
|
||||||
|
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||||
|
@echo
|
||||||
|
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||||
|
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||||
|
"(use \`make latexpdf' here to do that automatically)."
|
||||||
|
|
||||||
|
.PHONY: latexpdf
|
||||||
|
latexpdf:
|
||||||
|
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||||
|
@echo "Running LaTeX files through pdflatex..."
|
||||||
|
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||||
|
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||||
|
|
||||||
|
.PHONY: latexpdfja
|
||||||
|
latexpdfja:
|
||||||
|
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||||
|
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||||
|
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||||
|
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||||
|
|
||||||
|
.PHONY: text
|
||||||
|
text:
|
||||||
|
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||||
|
|
||||||
|
.PHONY: man
|
||||||
|
man:
|
||||||
|
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||||
|
|
||||||
|
.PHONY: texinfo
|
||||||
|
texinfo:
|
||||||
|
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||||
|
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||||
|
"(use \`make info' here to do that automatically)."
|
||||||
|
|
||||||
|
.PHONY: info
|
||||||
|
info:
|
||||||
|
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||||
|
@echo "Running Texinfo files through makeinfo..."
|
||||||
|
make -C $(BUILDDIR)/texinfo info
|
||||||
|
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||||
|
|
||||||
|
.PHONY: gettext
|
||||||
|
gettext:
|
||||||
|
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||||
|
|
||||||
|
.PHONY: changes
|
||||||
|
changes:
|
||||||
|
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||||
|
@echo
|
||||||
|
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||||
|
|
||||||
|
.PHONY: linkcheck
|
||||||
|
linkcheck:
|
||||||
|
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||||
|
@echo
|
||||||
|
@echo "Link check complete; look for any errors in the above output " \
|
||||||
|
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||||
|
|
||||||
|
.PHONY: doctest
|
||||||
|
doctest:
|
||||||
|
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||||
|
@echo "Testing of doctests in the sources finished, look at the " \
|
||||||
|
"results in $(BUILDDIR)/doctest/output.txt."
|
||||||
|
|
||||||
|
.PHONY: coverage
|
||||||
|
coverage:
|
||||||
|
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
|
||||||
|
@echo "Testing of coverage in the sources finished, look at the " \
|
||||||
|
"results in $(BUILDDIR)/coverage/python.txt."
|
||||||
|
|
||||||
|
.PHONY: xml
|
||||||
|
xml:
|
||||||
|
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
||||||
|
|
||||||
|
.PHONY: pseudoxml
|
||||||
|
pseudoxml:
|
||||||
|
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
||||||
|
|
||||||
|
.PHONY: dummy
|
||||||
|
dummy:
|
||||||
|
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
|
||||||
|
@echo
|
||||||
|
@echo "Build finished. Dummy builder generates no files."
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
<h2>Instaloader</h2>
|
||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
{% extends "!layout.html" %}
|
||||||
|
{% block extrahead %}
|
||||||
|
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||||
|
{% endblock %}
|
||||||
Vendored
+18
@@ -0,0 +1,18 @@
|
|||||||
|
{% if next %}
|
||||||
|
<h3>Next</h3>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="{{ next.link|e }}">{{ next.title }}</a></li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
<h3>Links</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://github.com/Thammus/instaloader/issues">Issue Tracker</a></li>
|
||||||
|
<li><a href="https://github.com/Thammus/instaloader/releases">Version History</a></li>
|
||||||
|
<li><a href="https://pypi.python.org/pypi/instaloader">Instaloader on PyPI</a></li>
|
||||||
|
<li><a href="https://github.com/Thammus/instaloader">Instaloader on GitHub</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a class="github-button" href="https://github.com/Thammus/Instaloader" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star Thammus/Instaloader on GitHub">Star</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
Usage as Python Module
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. include:: ../README.rst
|
||||||
|
:start-after: as-module-intro-start
|
||||||
|
:end-before: as-module-intro-end
|
||||||
|
|
||||||
|
|
||||||
|
``Instaloader`` (Main Class)
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: instaloader.Instaloader
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
|
||||||
|
.. _post-class:
|
||||||
|
|
||||||
|
``Post`` Class
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: instaloader.Post
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
Download Pictures from Instagram
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
Basic Usage
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. include:: ../README.rst
|
||||||
|
:start-after: basic-usage-start
|
||||||
|
:end-before: basic-usage-end
|
||||||
|
|
||||||
|
.. (continuation of --only-if explanation)
|
||||||
|
|
||||||
|
The given string is evaluated as a
|
||||||
|
`Python boolean expression <https://docs.python.org/3/reference/expressions.html#boolean-operations>`__,
|
||||||
|
where all occuring variables are properties of the :ref:`post-class`.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Command Line Options
|
||||||
|
====================
|
||||||
|
|
||||||
|
.. include:: ../README.rst
|
||||||
|
:start-after: cli-options-start
|
||||||
|
:end-before: cli-options-end
|
||||||
+346
@@ -0,0 +1,346 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Instaloader documentation build configuration file, created by
|
||||||
|
# sphinx-quickstart on Fri Aug 25 15:38:26 2017.
|
||||||
|
#
|
||||||
|
# This file is execfile()d with the current directory set to its
|
||||||
|
# containing dir.
|
||||||
|
#
|
||||||
|
# Note that not all possible configuration values are present in this
|
||||||
|
# autogenerated file.
|
||||||
|
#
|
||||||
|
# All configuration values have a default; values that are commented out
|
||||||
|
# serve to show the default.
|
||||||
|
|
||||||
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
|
#
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
sys.path.insert(0, os.path.abspath('..'))
|
||||||
|
|
||||||
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
|
# If your documentation needs a minimal Sphinx version, state it here.
|
||||||
|
#
|
||||||
|
# needs_sphinx = '1.0'
|
||||||
|
|
||||||
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
|
# ones.
|
||||||
|
extensions = [
|
||||||
|
'sphinx.ext.autodoc',
|
||||||
|
'sphinx_autodoc_typehints',
|
||||||
|
'sphinx.ext.githubpages',
|
||||||
|
]
|
||||||
|
|
||||||
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
# The suffix(es) of source filenames.
|
||||||
|
# You can specify multiple suffix as a list of string:
|
||||||
|
#
|
||||||
|
# source_suffix = ['.rst', '.md']
|
||||||
|
source_suffix = '.rst'
|
||||||
|
|
||||||
|
# The encoding of source files.
|
||||||
|
#
|
||||||
|
# source_encoding = 'utf-8-sig'
|
||||||
|
|
||||||
|
# The master toctree document.
|
||||||
|
master_doc = 'index'
|
||||||
|
|
||||||
|
# General information about the project.
|
||||||
|
project = 'Instaloader'
|
||||||
|
copyright = '2017, Alexander Graf and Andre Koch-Kramer'
|
||||||
|
author = 'Alexander Graf and Andre Koch-Kramer'
|
||||||
|
|
||||||
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
|
# |version| and |release|, also used in various other places throughout the
|
||||||
|
# built documents.
|
||||||
|
#
|
||||||
|
# The short X.Y version.
|
||||||
|
#version = '3.0'
|
||||||
|
# The full version, including alpha/beta/rc tags.
|
||||||
|
#release = '3.0rc0'
|
||||||
|
|
||||||
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
|
# for a list of supported languages.
|
||||||
|
#
|
||||||
|
# This is also used if you do content translation via gettext catalogs.
|
||||||
|
# Usually you set "language" from the command line for these cases.
|
||||||
|
language = None
|
||||||
|
|
||||||
|
# There are two options for replacing |today|: either, you set today to some
|
||||||
|
# non-false value, then it is used:
|
||||||
|
#
|
||||||
|
# today = ''
|
||||||
|
#
|
||||||
|
# Else, today_fmt is used as the format for a strftime call.
|
||||||
|
#
|
||||||
|
# today_fmt = '%B %d, %Y'
|
||||||
|
|
||||||
|
# List of patterns, relative to source directory, that match files and
|
||||||
|
# directories to ignore when looking for source files.
|
||||||
|
# This patterns also effect to html_static_path and html_extra_path
|
||||||
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||||
|
|
||||||
|
# The reST default role (used for this markup: `text`) to use for all
|
||||||
|
# documents.
|
||||||
|
#
|
||||||
|
# default_role = None
|
||||||
|
|
||||||
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||||
|
#
|
||||||
|
# add_function_parentheses = True
|
||||||
|
|
||||||
|
# If true, the current module name will be prepended to all description
|
||||||
|
# unit titles (such as .. function::).
|
||||||
|
#
|
||||||
|
add_module_names = False
|
||||||
|
|
||||||
|
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||||
|
# output. They are ignored by default.
|
||||||
|
#
|
||||||
|
# show_authors = False
|
||||||
|
|
||||||
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
|
pygments_style = 'sphinx'
|
||||||
|
|
||||||
|
# A list of ignored prefixes for module index sorting.
|
||||||
|
# modindex_common_prefix = []
|
||||||
|
|
||||||
|
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||||
|
# keep_warnings = False
|
||||||
|
|
||||||
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
|
todo_include_todos = False
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
|
||||||
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
|
# a list of builtin themes.
|
||||||
|
#
|
||||||
|
html_theme = 'alabaster'
|
||||||
|
|
||||||
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
|
# further. For a list of options available for each theme, see the
|
||||||
|
# documentation.
|
||||||
|
#
|
||||||
|
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 = []
|
||||||
|
|
||||||
|
# The name for this set of Sphinx documents.
|
||||||
|
# "<project> v<release> documentation" by default.
|
||||||
|
#
|
||||||
|
# html_title = 'Instaloader v3.0rc0'
|
||||||
|
|
||||||
|
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||||
|
#
|
||||||
|
# html_short_title = None
|
||||||
|
|
||||||
|
# The name of an image file (relative to this directory) to place at the top
|
||||||
|
# of the sidebar.
|
||||||
|
#
|
||||||
|
# html_logo = None
|
||||||
|
|
||||||
|
# The name of an image file (relative to this directory) to use as a favicon of
|
||||||
|
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||||
|
# pixels large.
|
||||||
|
#
|
||||||
|
# html_favicon = None
|
||||||
|
|
||||||
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
|
html_static_path = ['_static']
|
||||||
|
|
||||||
|
# Add any extra paths that contain custom files (such as robots.txt or
|
||||||
|
# .htaccess) here, relative to this directory. These files are copied
|
||||||
|
# directly to the root of the documentation.
|
||||||
|
#
|
||||||
|
# html_extra_path = []
|
||||||
|
|
||||||
|
# If not None, a 'Last updated on:' timestamp is inserted at every page
|
||||||
|
# bottom, using the given strftime format.
|
||||||
|
# The empty string is equivalent to '%b %d, %Y'.
|
||||||
|
#
|
||||||
|
# html_last_updated_fmt = None
|
||||||
|
|
||||||
|
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||||
|
# typographically correct entities.
|
||||||
|
#
|
||||||
|
# html_use_smartypants = True
|
||||||
|
|
||||||
|
# Custom sidebar templates, maps document names to template names.
|
||||||
|
#
|
||||||
|
html_sidebars = {'**': ["caption.html", "globaltoc.html", "relations.html", "links.html"] }
|
||||||
|
|
||||||
|
# Additional templates that should be rendered to pages, maps page names to
|
||||||
|
# template names.
|
||||||
|
#
|
||||||
|
# html_additional_pages = {}
|
||||||
|
|
||||||
|
# If false, no module index is generated.
|
||||||
|
#
|
||||||
|
html_domain_indices = False
|
||||||
|
|
||||||
|
# If false, no index is generated.
|
||||||
|
#
|
||||||
|
html_use_index = False
|
||||||
|
|
||||||
|
# If true, the index is split into individual pages for each letter.
|
||||||
|
#
|
||||||
|
# html_split_index = False
|
||||||
|
|
||||||
|
# If true, links to the reST sources are added to the pages.
|
||||||
|
#
|
||||||
|
html_show_sourcelink = False
|
||||||
|
|
||||||
|
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||||
|
#
|
||||||
|
html_show_sphinx = False
|
||||||
|
|
||||||
|
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||||
|
#
|
||||||
|
html_show_copyright = False
|
||||||
|
|
||||||
|
# If true, an OpenSearch description file will be output, and all pages will
|
||||||
|
# contain a <link> tag referring to it. The value of this option must be the
|
||||||
|
# base URL from which the finished HTML is served.
|
||||||
|
#
|
||||||
|
# html_use_opensearch = ''
|
||||||
|
|
||||||
|
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||||
|
# html_file_suffix = None
|
||||||
|
|
||||||
|
# Language to be used for generating the HTML full-text search index.
|
||||||
|
# Sphinx supports the following languages:
|
||||||
|
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
|
||||||
|
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
|
||||||
|
#
|
||||||
|
# html_search_language = 'en'
|
||||||
|
|
||||||
|
# A dictionary with options for the search language support, empty by default.
|
||||||
|
# 'ja' uses this config value.
|
||||||
|
# 'zh' user can custom change `jieba` dictionary path.
|
||||||
|
#
|
||||||
|
# html_search_options = {'type': 'default'}
|
||||||
|
|
||||||
|
# The name of a javascript file (relative to the configuration directory) that
|
||||||
|
# implements a search results scorer. If empty, the default will be used.
|
||||||
|
#
|
||||||
|
# html_search_scorer = 'scorer.js'
|
||||||
|
|
||||||
|
# Output file base name for HTML help builder.
|
||||||
|
htmlhelp_basename = 'Instaloaderdoc'
|
||||||
|
|
||||||
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
|
||||||
|
latex_elements = {
|
||||||
|
# The paper size ('letterpaper' or 'a4paper').
|
||||||
|
#
|
||||||
|
# 'papersize': 'letterpaper',
|
||||||
|
|
||||||
|
# The font size ('10pt', '11pt' or '12pt').
|
||||||
|
#
|
||||||
|
# 'pointsize': '10pt',
|
||||||
|
|
||||||
|
# Additional stuff for the LaTeX preamble.
|
||||||
|
#
|
||||||
|
# 'preamble': '',
|
||||||
|
|
||||||
|
# Latex figure (float) alignment
|
||||||
|
#
|
||||||
|
# 'figure_align': 'htbp',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
|
# (source start file, target name, title,
|
||||||
|
# author, documentclass [howto, manual, or own class]).
|
||||||
|
latex_documents = [
|
||||||
|
(master_doc, 'Instaloader.tex', 'Instaloader Documentation',
|
||||||
|
'Alexander Graf, André Koch-Kramer', 'manual'),
|
||||||
|
]
|
||||||
|
|
||||||
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
|
# the title page.
|
||||||
|
#
|
||||||
|
# latex_logo = None
|
||||||
|
|
||||||
|
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||||
|
# not chapters.
|
||||||
|
#
|
||||||
|
# latex_use_parts = False
|
||||||
|
|
||||||
|
# If true, show page references after internal links.
|
||||||
|
#
|
||||||
|
# latex_show_pagerefs = False
|
||||||
|
|
||||||
|
# If true, show URL addresses after external links.
|
||||||
|
#
|
||||||
|
# latex_show_urls = False
|
||||||
|
|
||||||
|
# Documents to append as an appendix to all manuals.
|
||||||
|
#
|
||||||
|
# latex_appendices = []
|
||||||
|
|
||||||
|
# It false, will not define \strong, \code, itleref, \crossref ... but only
|
||||||
|
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
|
||||||
|
# packages.
|
||||||
|
#
|
||||||
|
# latex_keep_old_macro_names = True
|
||||||
|
|
||||||
|
# If false, no module index is generated.
|
||||||
|
#
|
||||||
|
# latex_domain_indices = True
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for manual page output ---------------------------------------
|
||||||
|
|
||||||
|
# One entry per manual page. List of tuples
|
||||||
|
# (source start file, name, description, authors, manual section).
|
||||||
|
man_pages = [
|
||||||
|
(master_doc, 'instaloader', 'Instaloader Documentation',
|
||||||
|
[author], 1)
|
||||||
|
]
|
||||||
|
|
||||||
|
# If true, show URL addresses after external links.
|
||||||
|
#
|
||||||
|
# man_show_urls = False
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for Texinfo output -------------------------------------------
|
||||||
|
|
||||||
|
# Grouping the document tree into Texinfo files. List of tuples
|
||||||
|
# (source start file, target name, title, author,
|
||||||
|
# dir menu entry, description, category)
|
||||||
|
texinfo_documents = [
|
||||||
|
(master_doc, 'Instaloader', 'Instaloader Documentation',
|
||||||
|
author, 'Instaloader', 'One line description of project.',
|
||||||
|
'Miscellaneous'),
|
||||||
|
]
|
||||||
|
|
||||||
|
# Documents to append as an appendix to all manuals.
|
||||||
|
#
|
||||||
|
# texinfo_appendices = []
|
||||||
|
|
||||||
|
# If false, no module index is generated.
|
||||||
|
#
|
||||||
|
# texinfo_domain_indices = True
|
||||||
|
|
||||||
|
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||||
|
#
|
||||||
|
# texinfo_show_urls = 'footnote'
|
||||||
|
|
||||||
|
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||||
|
#
|
||||||
|
# texinfo_no_detailmenu = False
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
Instaloader
|
||||||
|
===========
|
||||||
|
|
||||||
|
**Instaloader** is a tool to download pictures (or videos) along with
|
||||||
|
their captions and other metadata from Instagram.
|
||||||
|
|
||||||
|
With `Python <https://www.python.org/>`__ installed, do:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
$ pip3 install instaloader
|
||||||
|
|
||||||
|
$ instaloader profile [profile ...]
|
||||||
|
|
||||||
|
**Instaloader**
|
||||||
|
|
||||||
|
- downloads **public and private profiles, hashtags, user stories and
|
||||||
|
feeds**,
|
||||||
|
|
||||||
|
- downloads **comments, geotags and captions** of each post,
|
||||||
|
|
||||||
|
- automatically **detects profile name changes** and renames the target
|
||||||
|
directory accordingly,
|
||||||
|
|
||||||
|
- allows **fine-grained customization** of filters and where to store
|
||||||
|
downloaded media,
|
||||||
|
|
||||||
|
- is free `Open Source <https://github.com/Thammus/instaloader>`__
|
||||||
|
software written in Python.
|
||||||
|
|
||||||
|
|
||||||
|
Table of Contents
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
installation
|
||||||
|
basic-usage
|
||||||
|
cli-options
|
||||||
|
as-module
|
||||||
|
|
||||||
|
Useful Links
|
||||||
|
------------
|
||||||
|
|
||||||
|
- `Git Repository (on GitHub) <https://github.com/Thammus/instaloader>`__
|
||||||
|
- `PyPI Project Page <https://pypi.python.org/pypi/instaloader>`__
|
||||||
|
- `Issue Tracker / Bug Tracker <https://github.com/Thammus/instaloader/issues>`__
|
||||||
|
- `Version History <https://github.com/Thammus/instaloader/releases>`__
|
||||||
|
|
||||||
|
.. include:: ../README.rst
|
||||||
|
:start-after: disclaimer-start
|
||||||
|
:end-before: disclaimer-end
|
||||||
|
|
||||||
|
|
||||||
|
..
|
||||||
|
* :ref:`genindex`
|
||||||
|
* :ref:`modindex`
|
||||||
|
* :ref:`search`
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
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.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
sphinx-autodoc-typehints
|
||||||
+1374
-638
File diff suppressed because it is too large
Load Diff
@@ -1,36 +1,61 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
if sys.version_info < (3, 3):
|
|
||||||
sys.exit('Instaloader requires Python >= 3.3.')
|
SRC = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
|
def get_version():
|
||||||
|
with open(os.path.join(SRC, 'instaloader.py')) as f:
|
||||||
|
for line in f:
|
||||||
|
m = re.match("__version__ = '(.*)'", line)
|
||||||
|
if m:
|
||||||
|
return m.group(1)
|
||||||
|
raise SystemExit("Could not find version string.")
|
||||||
|
|
||||||
|
|
||||||
|
if sys.version_info < (3, 5):
|
||||||
|
sys.exit('Instaloader requires Python >= 3.5.')
|
||||||
|
|
||||||
|
requirements = ['requests>=2.4']
|
||||||
|
|
||||||
|
if platform.system() == 'Windows' and sys.version_info < (3, 6):
|
||||||
|
requirements.append('win_unicode_console')
|
||||||
|
|
||||||
|
keywords = (['instagram', 'instagram-scraper', 'instagram-client', 'instagram-feed', 'downloader', 'videos', 'photos',
|
||||||
|
'pictures', 'instagram-user-photos', 'instagram-photos', 'instagram-metadata', 'instagram-downloader',
|
||||||
|
'instagram-stories'])
|
||||||
|
|
||||||
|
# NOTE that many of the values defined in this file are duplicated on other places, such as the
|
||||||
|
# documentation.
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='instaloader',
|
name='instaloader',
|
||||||
version='1.2',
|
version=get_version(),
|
||||||
py_modules=['instaloader'],
|
py_modules=['instaloader'],
|
||||||
url='https://github.com/Thammus/instaloader',
|
url='https://instaloader.readthedocs.io/',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
author='Alexander Graf, André Koch-Kramer',
|
author='Alexander Graf, André Koch-Kramer',
|
||||||
author_email='mail@agraf.me, koch-kramer@web.de',
|
author_email='mail@agraf.me, koch-kramer@web.de',
|
||||||
description='Tool to download Instagram pictures (or videos) and captions from a given set of '
|
description='Download pictures (or videos) along with their captions and other metadata '
|
||||||
'profiles (even if private), from your feed or from all followees of a given '
|
'from Instagram.',
|
||||||
'profile.',
|
long_description=open(os.path.join(SRC, 'README.rst')).read(),
|
||||||
long_description=open('README.rst').read(),
|
install_requires=requirements,
|
||||||
install_requires=['requests>=2.4'],
|
python_requires='>=3.5',
|
||||||
python_requires='>=3.3',
|
|
||||||
entry_points={'console_scripts': ['instaloader=instaloader:main']},
|
entry_points={'console_scripts': ['instaloader=instaloader:main']},
|
||||||
zip_safe=True,
|
zip_safe=True,
|
||||||
keywords='instagram downloader',
|
keywords=keywords,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
'Environment :: Console',
|
'Environment :: Console',
|
||||||
'Intended Audience :: End Users/Desktop',
|
'Intended Audience :: End Users/Desktop',
|
||||||
'License :: OSI Approved :: MIT License',
|
'License :: OSI Approved :: MIT License',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python :: 3.3',
|
|
||||||
'Programming Language :: Python :: 3.4',
|
|
||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.6',
|
||||||
'Programming Language :: Python :: 3 :: Only',
|
'Programming Language :: Python :: 3 :: Only',
|
||||||
|
|||||||
Reference in New Issue
Block a user