google-this
google-this copied to clipboard
v1.4.0 searching for images returns this error. it was working before
Steps to reproduce
hello, I just test this simple code and it returns error:
const images = await googlethis.image('The Wolf Among Us', { safe: false });
console.log(images);
Failure Logs
TypeError: Cannot read properties of null (reading '1')
at Object.image in googlethis/lib/core/main.js
Expected behavior
it was working before as it return json results of search images
Current behavior
it produces this error
Version
Default
Anything else?
No response
Checklist
- [X] I am running the latest version.
- [X] I checked the documentation and found no answer.
- [X] I have searched the existing issues and made sure this is not a duplicate.
- [X] I have provided sufficient information.
Same issue here.
Hey everyone, sorry for the delay ~ Seems like the structure of the response changed, I'll try to reproduce & fix this later today. Thanks!
Edit:
Or maybe a few parameters are missing in the request? In the previous version we would always include _reqid
and f.sid
in the request, but now those are always set to -0 (I thought they weren't important). I'll revert that change and publish a new version to NPM.
Edit 2: Done, please try v1.4.1 and let me know if it still errors out.
I got this error:
Uncaught SearchError: Unknown error
at Object.image (\googlethis\lib\core\main.js:210:11)
The code is just (async () => { await google.image("google") })()
.
I got this error:
Uncaught SearchError: Unknown error at Object.image (\googlethis\lib\core\main.js:210:11)
The code is just
(async () => { await google.image("google") })()
.
Update to v1.4.3 and let me know if it works, it should support Google's latest response structure.
It's working now! Thank you so much.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.