-
Notifications
You must be signed in to change notification settings - Fork 224
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
Error 418 provider duckduckgo #344
Comments
Minor change in tgpt required, as there is now additional header |
Checking |
Definitely not minor |
https://github.com/aandrew-me/tgpt/blob/main/providers%2Fduckduckgo%2Fduckduckgo.go#L70 Here instead of 1 header you need to get 2. |
Well unlike that header, here the server sends some text which needs to be decoded, which results in js code to be executed on the site, then some hashes need to be calculated based on the User agent and encoded again and sent as the header |
I suppose that trick will not live long, but as for now, I can pass arbitrary string as P.S. |
You're right, well make me do a quick fix for now then |
I get this error, I have tried on different devices and in all of them it fails, before it worked correctly.
Tested with different models of duckduckgo.
Some error has occurred. Statuscode: 418
{"action":"error","status":418,"type":"ERR_CHALLENGE","overrideCode":"e1b9","cd":{"cc":"duckchat","e":0,"er":null,"gk":0,"i":"3","iadb":1,"o":"vSD8q42JVHCoF9%2FbVw5H14hboXQ%2Fk45%2BM9vIvWOX5Wg%3D%0A","p":"913e055842b04de5b0133ead01fd04b2-28dcbc8f81f149d6ae7e139496bddd3e-dfb0d4b78770498b80245731afc4f0a1-82cc79af9a3d42799a5059d572da5297-a62aa9a3e32b417eac2838f4bf66c04f-81590901a89b4c9c94ca8c531431999c-7642706ae65b4d13a2a647320cbdbf43-d9a34a82af2f40b2b09e501ff8fe8bf4-f4b7707f0df0437f9aff45398ce6f1bf","q":"","r":"eun","s":"aichat","sc":1}}
The text was updated successfully, but these errors were encountered: