1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-09-11 16:22:24 +02:00

Rename Instaloader.download_story{,item}

It makes more sense since the object is called StoryItem.
This commit is contained in:
Alexander Graf 2018-04-12 22:04:06 +02:00
parent f0bebd0d96
commit 8ab7d3398f
2 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ def _main(instaloader: Instaloader, targetlist: List[str],
instaloader.download_post(structure, os.path.dirname(target))
elif isinstance(structure, StoryItem):
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):
instaloader.context.log("Going to download {} ({})".format(structure.username, target))
profiles.add(structure.username)

View File

@ -458,11 +458,11 @@ class Instaloader:
self.context.log("[%3i/%3i] " % (count, totalcount), end="", flush=True)
count += 1
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:
break
def download_story(self, item: StoryItem, target: str) -> bool:
def download_storyitem(self, item: StoryItem, target: str) -> bool:
"""Download one user story.
:param item: Story item, as in story['items'] for story in :meth:`get_stories`