fczuardi / instagram-hashtag

Shell scripts to get metadata from instagram photos of a certain hashtag without the API, hacking browser calls instead. ( visaourbanaiz )
Other
7 stars 0 forks source link

Problems fetch all images #2

Open immae1 opened 8 years ago

immae1 commented 8 years ago

Hi there, i have a problem to fetch all images. For example the tag #ABC have 54 entry's. if i run your hack.sh script i get only 10 image urls.

If i set the PAGESIZE="2" the script fetched 167 urls.

How could i get all 54 urls of the tag #ABC, and what is the variable PAGESIZE for? Greetings

fczuardi commented 8 years ago

the variable PAGESIZE is the number of results per query response, if you look at the request the browser does, you can see that Instagram uses 12.

fczuardi commented 8 years ago

by default the script will always try to get information about all photos with the setup hash tag, if you look at the source here https://github.com/fczuardi/instagram-hashtag/blob/master/hack.sh#L48-L55 you can see that the pagination is a loop that will only finish when there is no more pages left. If you want less than all search result pages you will have to patch that loop to exit earlier :)

immae1 commented 8 years ago

But why you use 33 for pagesize? if i set 12 i only get 10 of my 54 images from instagram -somethin won't work for me :( thats nice thx. i want all images from a specific hashtag so no need to update the loop ;)

fczuardi commented 8 years ago

Can you tell me the tag you are trying to fetch or your hack.sh file so I can try to reproduce your problem on my machine? you can private message me on Telegram (@fczuardi), Twitter (@fczuardi) or email fabricio@fabricio.org if you prefer.

shumr2261 commented 8 years ago

I just tried using your script.. and I can't find query in the developer tools.. all i see is bz.

fczuardi commented 8 years ago

this have happened to me once for a tag with few photos, I guess you can find the COOKIEHEADER and XCSRFTOKENHEADER from the bz request as well, and for STARTCURSOR maybe you could use the mid=XXXXXXXX; number from the begining of the cookie header.