santinic/how2

Sorry, I cannot find any reasonable answer for your query.

josephhyatt opened this issue ยท 21 comments

No matter what question I ask (even your example question) I keep getting "Sorry, I cannot find any reasonable answer for your query."

Example question:
how2 read file while is changing

Same here

Same here. No matter what questions it returns "Sorry, I cannot find any reasonable answer for your query." I have installed it with "sudo npm install -g how-2".

Same here!

same here even with the question how2 unzip bz2 which is illustrated in the readme:))
I installed without sudo.

Same here and because last version is 3 years old, I guess one of the APIs changed.

still broken

Hi guys and thank you for letting me know about this.

I immediately thought that this was caused by https://github.com/jprichardson/node-google.
I discovered that the library successfully retrieves an HTML containing the results, but unfortunately something changed in the response format, hence results are no more correctly parsed (this should be the broken line https://github.com/jprichardson/node-google/blob/master/lib/google.js#L68)

To fix this I should probably play a bit with cheerio and the produced HTML to see if I can extract results, changing the old div.g, which is apparently no more a valid selector.

My idea would be to also include that single-file-library (which is apparently not supported anymore) in this project and, eventually, switch from requests to axios to have Promise support in addition to this fix.

Feel free to help on this if you want/can.

I immediately thought that this was caused by https://github.com/jprichardson/node-google.
I discovered that the library successfully retrieves an HTML containing the results, but unfortunately something changed in the response format, hence results are no more correctly parsed (this should be the broken line https://github.com/jprichardson/node-google/blob/master/lib/google.js#L68)

To fix this I should probably play a bit with cheerio and the produced HTML to see if I can extract results, changing the old div.g, which is apparently no more a valid selector.

I've noticed that also, but since I discovered a new library that is maintained, I decided to modify it a bit to suit our needs and removed the old one.

My idea would be to also include that single-file-library (which is apparently not supported anymore) in this project and, eventually, switch from requests to axios to have Promise support in addition to this fix.

I can do it in the next PR ๐Ÿ˜„

@josephhyatt @pgcudahy @tomhayes @aranmohyeddin while we wait for the PR to be processed, you can download and install how2 from my Github repo and test it.

git clone https://github.com/VladimirMikulic/how2
sudo npm i -g ./how2

Enjoy ๐Ÿš€ ๐Ÿš€ ๐Ÿš€

@VladimirMikulic, could you please provide release section with downloadable tgz npm package?

Like this one from npm repository: https://registry.npmjs.org/how2/-/how2-1.7.1.tgz

It is needed to create Arch linux PKGBUILD.

@petRUShka as you wished, I added a release section. Good luck with Arch BTW :)

@petRUShka Thank you for maintaining the PKGBUILD ;)

@aranmohyeddin, @VladimirMikulic, how2 package uses @VladimirMikulic fork right now.

@petRUShka I'll keep it updated, feel free to suggest new features & report bugs.
I fixed the "b" keyboard shortcut for opening a link in the browser.
I could also publish it to the NPM registry, it would be easier to install(and keep it up to date).

@VladimirMikulic I wanna give you two likes if GitHub allows! Big Thanks ๐Ÿ‘๐Ÿป

@VladimirMikulic thanks a lot for suggesting google-it as new package to query Google and obtain results.
I saw you forked google-it to make some small adjustments, but I preferred to keep the "official version" as it seems to be constantly updated.

I just updated how-2 to 1.8.0 on NPM and merged in master the code using the new package.
Thanks to everybody and sorry for this loooong issue.

@PaoloCifariello glad you came back. Next time when you want to go on vacation feel free to message me :)

Hi @PaoloCifriello,

Thank you for returning on that. Not sure it is related to the latest fix, but strangely after update query like "how2 fly to the moon" return error. Maybe it should resolve it that way for these non-it related queries.

I am now getting this error, after the AI bit has been added. Never had it back when it was only stackoverflow.

"Sorry, I cannot find any reasonable answer for your query." Has anyone else encountered this after the update?