Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Instagram pagination tags
#1
Hello,

I am doing a development based on instagram, I do not use the API because they do not allow applications in development mode but in production mode.

So, I'm trying to get the following pages regarding a hashtag, for example:
Https://www.instagram.com/explore/tags/plebiscito/

The next page is done by sending a POST method, to a /query / and a /ajax/bz, however, trying to try it with cURL does not work for me.

I leave as I have been doing with cURL.

curl "https://www.instagram.com/explore/tags/plebiscito/" --http1.1 -k "https://www.instagram.com/query/" -H "Content-Type: application/x-www-form-urlencoded" -X POST -d "q=ig_hashtag(plebiscito)+{+media.after(j0hwe66aaaaaf0hwexjmwaaafkwa,+12)+{++count,++nodes+{++++caption,++++code,++++comments+{++++++count++++},++++comments_disabled,++++date,++++dimensions+{++++++height,++++++width++++},++++display_src,++++id,++++is_video,++++likes+{++++++count++++},++++owner+{++++++id++++},++++thumbnail_src,++++video_views++},++page_info}+}&ref=tags::show&query_id=/" --next --http1.1 -k "https://www.instagram.com/ajax/bz" -H "Content-Type: application/json" -X POST -d '{"q":[{"page_id":"7mj51x","posts":[["timespent_bit_array",{"tos_id":"7mj51x","start_time":1481556875,"tos_array":[3,0],"tos_len":2,"tos_seq":2,"tos_cum":19,"log_time":1481556876912},1481556876912,0]],"trigger":"timespent_bit_array"}],"ts":1481556877336}' --next -k "https://www.instagram.com/query/" -H "Content-Type: application/x-www-form-urlencoded" -X POST -d "q=ig_hashtag(plebiscito)+{+media.after(j0hwe66aaaaaf0hwexjmwaaafkwa,+8)+{++count,++nodes+{++++caption,++++code,++++comments+{++++++count++++},++++comments_disabled,++++date,++++dimensions+{++++++height,++++++width++++},++++display_src,++++id,++++is_video,++++likes+{++++++count++++},++++owner+{++++++id++++},++++thumbnail_src,++++video_views++},++page_info}+}&ref=tags::show&query_id=/" --next -k "https://www.instagram.com/ajax/bz" -H "Content-Type: application/json" -X POST -d '{"q":[{"page_id":"7mj51x","posts":[["timespent_bit_array",{"tos_id":"7mj51x","start_time":1481556875,"tos_array":[3,0],"tos_len":2,"tos_seq":2,"tos_cum":19,"log_time":1481556876912},1481556876912,0]],"trigger":"timespent_bit_array"}],"ts":1481556877336}'
Here I was trying to get page two, however, it responds with a page not found.

In short, I need to automate the pages with Python, but I was testing it with cURL.

Could you help me? thank you very much.
Reply
#2
(Dec-12-2016, 06:53 PM)Kalet Wrote: I am doing a development based on instagram, I do not use the API because they do not allow applications in development mode but in production mode.

...then ask them how to develop.  If the production servers are not available while "developing", then they'll have development servers available.  And if they don't, then just use the production servers.

Unless the issue is the lib isn't available, in which case, this looks decent: https://github.com/LevPasha/Instagram-API-python
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to make bot that sends instagram auto password reset code kraixx 2 1,282 Mar-04-2023, 09:59 PM
Last Post: jefsummers
  instagram followers name without suggestion for you jacklee26 1 3,127 Oct-02-2021, 04:57 AM
Last Post: ndc85430
  Predicting Likes on Instagram Posts donnertrud 1 2,282 Dec-28-2019, 08:53 AM
Last Post: kamaleon
  Loop through tags inside tags in Selenium/Python xpack24 1 5,637 Oct-23-2019, 10:15 AM
Last Post: Larz60+
  Get pagination Instagram Kalet 0 5,908 Dec-14-2016, 12:21 AM
Last Post: Kalet
  Python Instagram bot user-following problem danotto 1 4,971 Dec-11-2016, 10:36 PM
Last Post: Blue Dog
  I need help with an instagram bot bobduckling221 2 18,269 Oct-02-2016, 04:59 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020