-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get query_hash? #7
Comments
Hi! Here you have the specification: /docs/setup.md#how-to-get-your-query-hash-old-query-id Into the |
@alexhoma Thanks for your replay, I read the docs, but I want to generate query hash by myself. |
@alexhoma query_hash does not change forever? |
what is the point of query_hash? I would expect it would be a way from instagram to confirm the query is coming from an informed sender. But if the hash is consistent, (i.e. doesn't have a parameter like time of day) then what is the point? |
It is not, it's just a way for them to cache the query params so that they can store and return the response faster. You should be able to generate it, using i.e. hash.js package |
Hi @hexadeciman. I don't think the answer in the Stack Overflow thread is correct as the query_hash is always the same for every request ( |
Hmm, weird. For example, I'm loading @mileycyrus and @instagram. First request for both accounts has the following query hashes (the same):
In successive requests, for pagination, again the same:
Also, they send all the data instead of first the query_hash. So this defeats the concept of the automated persisted queries Edit: All of this is anonymously. I'm not logged in. |
Hello, @Kingson, query hash you can find in browser dev tools (https://github.com/mineur/instagram-parser/blob/master/docs/setup.md#how-to-get-your-query-hash-old-query-id) and then in neighbor tab JS you can find it in one of many loaded JS files, by Ctrl + F. Then before each request you can get content of this JS file from the link in html and parse generated query hash by regex. |
Need help for stories?how can i get stories now? |
Does the query hash ever expire? or does it have a query limit? |
Hello, |
query_hash hardcoded in one of *.js files on instagram. If u want to get hash, u should parse js files. |
Yes, I actually found out. Thanks ! |
This comment was marked as spam.
This comment was marked as spam.
Have a look at this. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@meshchaninov thanks, really it is in the static JS files. |
i do not kown why my queryId as same as yourself ! but the name of the .js filepath was different, and i can not access your .js filepath url |
hash_query does not hash the variables or the parameters, it hashes the path.
Then this graphql payload will be hashed and it becomes |
Any thoughts how to get query hash now days? Seems it changed and we can't get it in same way anymore |
I would like to get query hash, any helpful info for me, thanks.
The text was updated successfully, but these errors were encountered: