Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Get account favourites #69

Open
ghost opened this issue Jun 23, 2016 · 1 comment
Open

Get account favourites #69

ghost opened this issue Jun 23, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 23, 2016

I guess there is a problem with the method get_account_favorites. When i try to get all favourites, i only get the images on the first page.
This is my code after authentication:

imgs = client.get_account_favorites(username)
    for index, img in enumerate(imgs["data"]):
       print "Loading " + str(index) + " from " + str(len(imgs["data"]))
       if img["type"]:
           if img["type"] == "image/gif":
               urllib.urlretrieve(img["gifv"], str(index) + ".gif")
           else:
              urllib.urlretrieve(img["link"], str(index) +".jpg")

I already tried to change the method implemenation to this version, without the page parameter. But this doesnt work, too.

def get_account_favorites(self, username):
        self.validate_user_context(username)
        favorites = self.make_request('GET', 'account/%s/favorites/' % username)

        return build_gallery_images_and_albums(favorites)

Maybe there is a problem with the api or i have made a failure in my code?
Thanks.

@kierun
Copy link

kierun commented Aug 1, 2017

Any update on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant