Skip to content
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

TypeError: Cannot read property 'text' of undefined #1

Open
chriseckman opened this issue Oct 27, 2017 · 2 comments
Open

TypeError: Cannot read property 'text' of undefined #1

chriseckman opened this issue Oct 27, 2017 · 2 comments
Labels

Comments

@chriseckman
Copy link

I'm getting a error here:

return b.getElementsByClassName('_gUb')[0].text()
^

@0-ali 0-ali added the bug label Nov 3, 2017
@Bellisario
Copy link

Same issue for me

@soringabriel
Copy link

That's cause this is no proper image recognition package. If you guys look through the code, it's just doing a reverse image search on google and it's trying to extract the text that google associates it with. However the class of the element from google changes over time, and causes this problem...

If you want to use this, even though it's working just as a reverse image search on google, you can just edit that line in node_modules (or fork and create your own package out of this one) and replace in these lines https://github.com/xc0d3rz/npm-imagerecognition/blob/master/imagerecognition.js#L82 the class with the correct one that google is using (basically at the time of writing this message you should just replace _gUb with fKDtNb)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants