Tuesday, 15 March 2011

Instagram API Python: pagination for api.tag_recent_media -


I find this script to search for photos via keywords, here you have the code:

  API = InstagramApi (access_token = access_token) Tag_nam = Kchche_input ( "Insrssi La Parola di Sirkear") filtered_media = api.tag_recent_media (count = 40, Adiktm_aidi = 1, Tag_nam = Tag_nam)  
< P> But my problem is that even though I write count = 40 , I can only download 33 images. How can I solve it?

EDIT: By reading the site I saw that it is necessary to score points on the page, but I am still confused: I max_id and min_id Work with parameters or next_url parameter?

Can anyone provide some examples / tutorials / explanations in the web? Thanks!

You can get under the next page:

  Tag_recent_media , next_ = api.tag_recent_media (tag_name = "whatever_tag") tag_recent_media, next_ = api.tag_recent_media (Tag_ name = "whatever_tag", with_next_url = next_)  

No comments:

Post a Comment