-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/blog/content/context: update google/google.go to migrate to the new search API #34098
Comments
I'm not able to reproduce this. When I navigate to that URL I see the following: https://blog.golang.org/context/google/google.go// +build OMIT// Package google provides a function to do Google searches using the Google Web import (
) // Results is an ordered list of search results. // A Result contains the title and URL of a search result. // Search sends query to Google search and returns the results.
} // httpDo issues the HTTP request and calls f with the response. If ctx.Done is Are you still experiencing this issue? |
Hi,
I am sorry if I was not clear in my previous message. And yes I am still experiencing this issue. Here are the steps I took.
I cut and pasted the code (I liked the tutorial) and tried it straight out. I got a timeout on1 second and then 10 seconds. The URL I entered was
http://localhost:8080/search/?q=Golang&t=10 and it gave me:
0 results in 704.929625ms: timeout 10s
So I took out the url from google.go added a query to it and tried it in my browser.
https://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=golang
That is when I got the message telling me that I had to use a different url.
{“responsedata “ : null, “responseDetails “: “The Google Web Search API is no longer available. Please migrate to the Google Custom Search API(https://developers.google.com/custom-search/)”, “responseStatus”= 403}
I pasted this message from my browser in my issue report. Which may be misleading. I hope this email is more helpful.
Thx VincentF
… On Sep 5, 2019, at 9:23 AM, katiehockman ***@***.***> wrote:
I'm not able to reproduce this. When I navigate to that URL I see the following:
https://blog.golang.org/context/google/google.go
Are you still experiencing this issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@iridiscent thanks for the additional context. I'm still not sure I completely understand the issue, but looping in @andybons who may know more. |
As it says in the error message:
We don’t maintain that API. Just the example, which we likely won’t update as blog entries are considered somewhat immutable. I’m sure there are other APIs you could adapt this workflow to, but we can’t do anything in this case. Thanks. |
No problem. Will work around.
Thx VincentF
… On Sep 6, 2019, at 10:39 AM, Andrew Bonventre ***@***.***> wrote:
As it says in the error message:
The Google Web Search API is no longer available. Please migrate to the Google Custom Search API (https://developers.google.com/custom-search/)
We don’t maintain that API. Just the example, which we likely won’t update as blog entries are considered somewhat immutable.
I’m sure there are other APIs you could adapt this workflow to, but we can’t do anything in this case.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?Mac OSX darwin amd64
go env
OutputWhat did you do?
https://blog.golang.org/context/google/google.go
In func Search the URL
req, err := http.NewRequest("GET", "https://ajax.googleapis.com/ajax/services/search/web?v=1.0", nil)
is no longer valid. Using it directly in my browser with a query gave me the following response:
{"responseData": null, "responseDetails": "The Google Web Search API is no longer available. Please migrate to the Google Custom Search API (https://developers.google.com/custom-search/)", "responseStatus": 403}
What did you expect to see?
Expected to see search results
What did you see instead?
Saw the response above
The text was updated successfully, but these errors were encountered: