-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Implemented the usage of google search for regular search, interactive search, and manual search #56
Conversation
…so edited and bolded commands in the table to make the examples more clear
* Fixed some quick spelling mistakes, capitalization, and bolding a title * Fixed more typoes and reworded some phrases to make it more clear. Also edited and bolded commands in the table to make the examples more clear * Quick capitalization fix
…zes Google Search
I didn't implement google search for the -tag option because I'm not really sure how you want it to work. I tested it and it's very simple to implement and very similar to the stack overflow version, but it doesn't really make sense to search google with tags. Should we just keep it so that -tag defaults to a Stack Overflow search even if "google_search" is set to True? |
@aaxu thanks a lot ❤️. I will surely review this and get it merged 👍 |
@aaxu thanks for your contribution... This needs more testing.... It is causing an error sometimes while using
|
Did you receive this error while repeatedly testing? |
Thanks. I will do more testing and let you know. Please dont forget to use the uptodate develop branch while testing.... |
Hey @gautamkrishnar, I saw that on your in the code you wrote that we still had to implement the captcha check for google searches. I tested it and apparently, when you receive a captcha from your terminal, even if you extract the link and solve it in your browser, it doesn't unblock your terminal. The terminal and browser seems to be independent of each other for Google's system. This also works the other way around, where even if you receive a captcha in your browser, you can still perform google searches through SoCLI. I'm not really sure how to do this without any hack workarounds or recaptcha solvers, but normal users shouldn't normally encounter this issue. I had to queue 50-100 socli searches before I got blocked by google, so it should be a rare problem. How do you want to handle this? |
@aaxu yeah since we are using randomized user agents it wont work either. Lets leave the problem caused by google unfixed since it is a rare problem. |
This can be changed back to using Stack Overflow by simply changing the global variable "google_search" to False. This also fixes some errors that the old implementation had because extracting the links from a google search seems to produce different formats at different times. I added a method fixGoogleURL to fix these different types of links. I'm not sure how the randomizing of the agents work as @gautamkrishnar described in issue #49 but you shouldn't get blocked by google if you don't repeatedly spam commands. Searching like a normal person (at most one search every few seconds) shouldn't cause google to block your IP.
My merge also contains the updated README on accident. I'm not sure if this is okay, but I'm new to git so sorry about that! Let me know if you want that changed.