How to use instaloader - 10 common examples

To help you get started, we’ve selected a few instaloader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def test_private_profile_paging(self):
        self.post_paging_test(instaloader.Profile.from_username(self.L.context, PRIVATE_PROFILE).get_posts())
github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def test_public_profile_paging(self):
        self.post_paging_test(instaloader.Profile.from_username(self.L.context, PUBLIC_PROFILE).get_posts())
github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def test_saved_paging(self):
        for count, post in enumerate(instaloader.Profile.from_username(self.L.context, OWN_USERNAME).get_saved_posts()):
            print(post)
            if count == PAGING_MAX_COUNT:
                break
github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def test_public_profile_tagged_paging(self):
        for post in islice(instaloader.Profile.from_username(self.L.context, PUBLIC_PROFILE).get_tagged_posts(),
                           PAGING_MAX_COUNT):
            print(post)
github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def test_get_followees(self):
        profile = instaloader.Profile.from_username(self.L.context, OWN_USERNAME)
        for f in profile.get_followees():
            print(f.username)
github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def test_post_from_mediaid(self):
        for post in instaloader.Profile.from_username(self.L.context, PUBLIC_PROFILE).get_posts():
            post2 = instaloader.Post.from_mediaid(self.L.context, post.mediaid)
            self.assertEqual(post, post2)
            break
github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def test_public_profile_igtv(self):
        for post in islice(instaloader.Profile.from_username(self.L.context, PUBLIC_PROFILE_WITH_IGTV).get_igtv_posts(),
                           PAGING_MAX_COUNT):
            print(post)
github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def test_get_similar_accounts(self):
        profile = instaloader.Profile.from_username(self.L.context, OWN_USERNAME)
        for f in profile.get_similar_accounts():
            print(f.username)
github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def test_get_followers(self):
        profile = instaloader.Profile.from_username(self.L.context, OWN_USERNAME)
        for f in profile.get_followers():
            print(f.username)
github instaloader / instaloader / test / instaloader_unittests.py View on Github external
def setUp(self):
        self.dir = tempfile.mkdtemp()
        print("Testing in {}".format(self.dir))
        os.chdir(self.dir)
        self.L = instaloader.Instaloader(download_geotags=True,
                                         download_comments=True,
                                         save_metadata=True)
        self.L.context.raise_all_errors = True
        # pylint:disable=protected-access
        self.L.context._graphql_query_timestamps = instaloadercontext_query_timestamps.copy()