This repository has been archived by the owner on Sep 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 316
cannot get gql_POST, status code 400 #181
Labels
duplicate
This issue or pull request already exists
Comments
def extract_formkey(self, html): what could have happened and that id changed name or location |
Cool, the problem has been solved, here's the solution. Modify the # -----Original
script_regex = r'<script>if\(.+\)throw new Error;(.+)</script>'
script_text = re.search(script_regex, html).group(1)
# -----Modified
# script_regex = r'<script>if\(.+\)throw new Error;(.+)</script>'
# script_text = re.search(script_regex, html).group(1)
script_text = html
# -----Original
self.formkey = self.extract_formkey(r.text)
# -----Modified
self.formkey = self.extract_formkey(r.text)[:32]
# -----Original
base_string = payload + self.gql_headers["poe-formkey"][:32] + "WpuLMiXEKKE98j56k"
# -----Modified
base_string = payload + self.gql_headers["poe-formkey"][:32] + "Jb1hi3fg1MxZpzYfy" |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Originally posted by @ading2210 in #39 (comment)
Testing has found that self.gql_headers["poe-formkey"] can change, sometimes it is a 32-character string: ce7201131f80b20558f1a290a4690a4c, and sometimes it is a 33-character string: ce7201131f80b20558f1a290a4690a4c0. And it seems that the algorithm for generating the "poe-tag-id" in the headers has changed, resulting in the following problem.
The text was updated successfully, but these errors were encountered: