From 91976e595acc44e6711ee1cb6f306ff1c522d634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Koch-Kramer?= Date: Thu, 22 Mar 2018 17:36:03 +0100 Subject: [PATCH] Implements get_explore_posts() --- instaloader.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/instaloader.py b/instaloader.py index 5d1d556..0757170 100755 --- a/instaloader.py +++ b/instaloader.py @@ -1426,6 +1426,13 @@ class Instaloader: if fast_update and not downloaded: break + @_requires_login + def get_explore_posts(self) -> Iterator[Post]: + """Get Posts which are worthy of exploring suggested by Instagram.""" + yield from (Post(self, node) for node in self.graphql_node_list("df0dcc250c2b18d9fd27c5581ef33c7c", + {}, 'https://www.instagram.com/explore/', + lambda d: d['data']['user']['edge_web_discover_media'])) + def get_hashtag_posts(self, hashtag: str) -> Iterator[Post]: """Get Posts associated with a #hashtag.""" yield from (Post(self, node) for node in