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

Add meth:get_tagged_posts to Profile

This commit is contained in:
Lars Lindqvist 2018-07-26 19:51:33 +02:00 committed by GitHub
parent 0ebb223214
commit 3cde1f7db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -609,6 +609,16 @@ class Profile:
self._rhx_gis,
self._metadata('edge_saved_media')))
def get_tagged_posts(self) -> Iterator[Post]:
"""Retrieve all posts where a profile is tagged."""
self._obtain_metadata()
yield from (Post(self._context, node, self) for node in
self._context.graphql_node_list("e31a871f7301132ceaab56507a66bbb7",
{'id': self.userid},
'https://www.instagram.com/{0}/'.format(self.username),
lambda d: d['data']['user']['edge_user_to_photos_of_you'],
self._rhx_gis))
def get_followers(self) -> Iterator['Profile']:
"""
Retrieve list of followers of given profile.