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

Google Search not working #1

Closed
ishu3101 opened this issue Jul 4, 2016 · 2 comments
Closed

Google Search not working #1

ishu3101 opened this issue Jul 4, 2016 · 2 comments
Labels

Comments

@ishu3101
Copy link

ishu3101 commented Jul 4, 2016

Since the Google Web Search API is deprecated, when you run the command from the command line, you getting this message: The Google Web Search API is no longer available. Please migrate to the Google Custom Search API (https://developers.google.com/custom-search/)

@gfody gfody added the bug label Jul 5, 2016
gfody added a commit that referenced this issue Jul 10, 2016
@gfody gfody closed this as completed Jul 10, 2016
@ishu3101
Copy link
Author

Getting the following error message, when I run google hello command.

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
At GoogleSearch.ps1:35 char:13
+             $url = $_.getAttribute('url', 1)
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], UnauthorizedAccessExce
   ption
    + FullyQualifiedErrorId : System.UnauthorizedAccessException

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
At GoogleSearch.ps1:40 char:42
+ ...                write-bold "$(($c++)). $($_.getAttribute('title', 1))"
+                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], UnauthorizedAccessExce
   ption
    + FullyQualifiedErrorId : System.UnauthorizedAccessException

4.
?q=hello&prmd=ivnsfd&tbm=isch&tbo=u&source=univ
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
At GoogleSearch.ps1:42 char:17
+ ...             write-bold ([Web.HttpUtility]::HtmlDecode($_.getAttribute ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], UnauthorizedAccessExce
   ption
    + FullyQualifiedErrorId : System.UnauthorizedAccessException

@gfody
Copy link
Owner

gfody commented Jul 11, 2016

looks like the js supported by IHTMLDocument2 is not very consistent - I just swapped that out for a simple regex. Should work everywhere and as a bonus it's much faster as well

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

2 participants