Merge branch 'master' into upcoming/v4.7
This commit is contained in:
commit
8f594a3a30
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
.. |downloads| image:: https://pepy.tech/badge/instaloader/month
|
.. |downloads| image:: https://pepy.tech/badge/instaloader/month
|
||||||
:alt: PyPI Download Count
|
:alt: PyPI Download Count
|
||||||
:target: https://pepy.tech/project/instaloader/month
|
:target: https://pepy.tech/project/instaloader
|
||||||
|
|
||||||
.. badges-end
|
.. badges-end
|
||||||
|
|
||||||
@ -84,7 +84,9 @@ To later **update your local copy** of that profiles, you may run
|
|||||||
instaloader --fast-update profile [profile ...]
|
instaloader --fast-update profile [profile ...]
|
||||||
|
|
||||||
If ``--fast-update`` is given, Instaloader stops when arriving at the
|
If ``--fast-update`` is given, Instaloader stops when arriving at the
|
||||||
first already-downloaded picture. When updating profiles, Instaloader
|
first already-downloaded picture.
|
||||||
|
|
||||||
|
When updating profiles, Instaloader
|
||||||
automatically **detects profile name changes** and renames the target directory
|
automatically **detects profile name changes** and renames the target directory
|
||||||
accordingly.
|
accordingly.
|
||||||
|
|
||||||
|
@ -220,12 +220,20 @@ How to Download
|
|||||||
used to save the information to resume an interrupted download. The default
|
used to save the information to resume an interrupted download. The default
|
||||||
prefix is ``iterator``.
|
prefix is ``iterator``.
|
||||||
|
|
||||||
Resuming an interrupted download is supported for most, but not all targets.
|
Resuming an interrupted download is supported for the following targets:
|
||||||
|
- Profile posts,
|
||||||
|
- Profile IGTV posts (:option:`--igtv`),
|
||||||
|
- Profile tagged posts (:option:`--tagged`),
|
||||||
|
- Saved posts (``:saved``).
|
||||||
|
|
||||||
|
This feature is enabled by default for targets where it is supported;
|
||||||
|
:option:`--resume-prefix` only changes the name of the iterator files.
|
||||||
|
|
||||||
|
To turn this feature off, use :option:`--no-resume`.
|
||||||
|
|
||||||
JSON files with resume information are always compressed, regardless of
|
JSON files with resume information are always compressed, regardless of
|
||||||
:option:`--no-compress-json`.
|
:option:`--no-compress-json`.
|
||||||
|
|
||||||
This feature is turned off entirely with :option:`--no-resume`.
|
|
||||||
|
|
||||||
.. versionadded:: 4.5
|
.. versionadded:: 4.5
|
||||||
|
|
||||||
.. option:: --no-resume
|
.. option:: --no-resume
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"""Download pictures (or videos) along with their captions and other metadata from Instagram."""
|
"""Download pictures (or videos) along with their captions and other metadata from Instagram."""
|
||||||
|
|
||||||
|
|
||||||
__version__ = '4.6.1'
|
__version__ = '4.6.2'
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -599,15 +599,15 @@ class Instaloader:
|
|||||||
suffix = None
|
suffix = None
|
||||||
if self.download_pictures and (not sidecar_node.is_video or self.download_video_thumbnails):
|
if self.download_pictures and (not sidecar_node.is_video or self.download_video_thumbnails):
|
||||||
# pylint:disable=cell-var-from-loop
|
# pylint:disable=cell-var-from-loop
|
||||||
filename = self.__prepare_filename(filename_template, lambda: sidecar_node.display_url)
|
sidecar_filename = self.__prepare_filename(filename_template, lambda: sidecar_node.display_url)
|
||||||
# Download sidecar picture or video thumbnail (--no-pictures implies --no-video-thumbnails)
|
# Download sidecar picture or video thumbnail (--no-pictures implies --no-video-thumbnails)
|
||||||
downloaded &= self.download_pic(filename=filename, url=sidecar_node.display_url,
|
downloaded &= self.download_pic(filename=sidecar_filename, url=sidecar_node.display_url,
|
||||||
mtime=post.date_local, filename_suffix=suffix)
|
mtime=post.date_local, filename_suffix=suffix)
|
||||||
if sidecar_node.is_video and self.download_videos:
|
if sidecar_node.is_video and self.download_videos:
|
||||||
# pylint:disable=cell-var-from-loop
|
# pylint:disable=cell-var-from-loop
|
||||||
filename = self.__prepare_filename(filename_template, lambda: sidecar_node.video_url)
|
sidecar_filename = self.__prepare_filename(filename_template, lambda: sidecar_node.video_url)
|
||||||
# Download sidecar video if desired
|
# Download sidecar video if desired
|
||||||
downloaded &= self.download_pic(filename=filename, url=sidecar_node.video_url,
|
downloaded &= self.download_pic(filename=sidecar_filename, url=sidecar_node.video_url,
|
||||||
mtime=post.date_local, filename_suffix=suffix)
|
mtime=post.date_local, filename_suffix=suffix)
|
||||||
else:
|
else:
|
||||||
downloaded = False
|
downloaded = False
|
||||||
|
@ -296,7 +296,7 @@ class Post:
|
|||||||
end = len(edges)-1
|
end = len(edges)-1
|
||||||
if start < 0:
|
if start < 0:
|
||||||
start = len(edges)-1
|
start = len(edges)-1
|
||||||
if any(self.get_is_videos()[start:(end+1)]):
|
if any(edge['node']['is_video'] and 'video_url' not in edge['node'] for edge in edges):
|
||||||
# video_url is only present in full metadata, issue #558.
|
# video_url is only present in full metadata, issue #558.
|
||||||
edges = self._full_metadata['edge_sidecar_to_children']['edges']
|
edges = self._full_metadata['edge_sidecar_to_children']['edges']
|
||||||
for idx, edge in enumerate(edges):
|
for idx, edge in enumerate(edges):
|
||||||
@ -854,7 +854,7 @@ class Profile:
|
|||||||
self._obtain_metadata()
|
self._obtain_metadata()
|
||||||
return NodeIterator(
|
return NodeIterator(
|
||||||
self._context,
|
self._context,
|
||||||
'472f257a40c653c64c666ce877d59d2b',
|
'003056d32c2554def87228bc3fd9668a',
|
||||||
lambda d: d['data']['user']['edge_owner_to_timeline_media'],
|
lambda d: d['data']['user']['edge_owner_to_timeline_media'],
|
||||||
lambda n: Post(self._context, n, self),
|
lambda n: Post(self._context, n, self),
|
||||||
{'id': self.userid},
|
{'id': self.userid},
|
||||||
|
Loading…
Reference in New Issue
Block a user