mirror of
https://github.com/instaloader/instaloader.git
synced 2024-11-04 09:22:29 +01:00
Rename Instaloader.download_story{,item}
It makes more sense since the object is called StoryItem.
This commit is contained in:
parent
f0bebd0d96
commit
8ab7d3398f
@ -94,7 +94,7 @@ def _main(instaloader: Instaloader, targetlist: List[str],
|
|||||||
instaloader.download_post(structure, os.path.dirname(target))
|
instaloader.download_post(structure, os.path.dirname(target))
|
||||||
elif isinstance(structure, StoryItem):
|
elif isinstance(structure, StoryItem):
|
||||||
instaloader.context.log("Attempting to download {} ({})".format(structure, target))
|
instaloader.context.log("Attempting to download {} ({})".format(structure, target))
|
||||||
instaloader.download_story(structure, os.path.dirname(target))
|
instaloader.download_storyitem(structure, os.path.dirname(target))
|
||||||
elif isinstance(structure, Profile):
|
elif isinstance(structure, Profile):
|
||||||
instaloader.context.log("Going to download {} ({})".format(structure.username, target))
|
instaloader.context.log("Going to download {} ({})".format(structure.username, target))
|
||||||
profiles.add(structure.username)
|
profiles.add(structure.username)
|
||||||
|
@ -458,11 +458,11 @@ class Instaloader:
|
|||||||
self.context.log("[%3i/%3i] " % (count, totalcount), end="", flush=True)
|
self.context.log("[%3i/%3i] " % (count, totalcount), end="", flush=True)
|
||||||
count += 1
|
count += 1
|
||||||
with self.context.error_catcher('Download story from user {}'.format(name)):
|
with self.context.error_catcher('Download story from user {}'.format(name)):
|
||||||
downloaded = self.download_story(item, filename_target)
|
downloaded = self.download_storyitem(item, filename_target)
|
||||||
if fast_update and not downloaded:
|
if fast_update and not downloaded:
|
||||||
break
|
break
|
||||||
|
|
||||||
def download_story(self, item: StoryItem, target: str) -> bool:
|
def download_storyitem(self, item: StoryItem, target: str) -> bool:
|
||||||
"""Download one user story.
|
"""Download one user story.
|
||||||
|
|
||||||
:param item: Story item, as in story['items'] for story in :meth:`get_stories`
|
:param item: Story item, as in story['items'] for story in :meth:`get_stories`
|
||||||
|
Loading…
Reference in New Issue
Block a user