Add Google search results to Cardapio
The idea is to rename "Other results" to "Other local results", and add another section for "Other web results" which would get information from Google as you type.
This can be easily done using Google's AJAX API:
-------
import urllib2
import simplejson
# This example request includes an optional API key which you will need to
# remove or replace with your own key.
# Read more about why it's useful to have an API key.
# The request also includes the userip parameter which provides the end
# user's IP address. Doing so will help distinguish this legitimate
# server-side traffic from traffic which doesn't come from an end-user.
url = ('http://
request = urllib2.Request(
url, None, {'Referer': /* Enter the URL of your site here */})
response = urllib2.
# Process the JSON string.
results = simplejson.
# now have some fun with the results...
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Thiago Teixeira
- Completed by
- Thiago Teixeira
Related branches
Related bugs
Sprints
Whiteboard
(Please APPEND your comments at the end of this whiteboard. And don't forget to identify yourself, as shown below)
-------
[tvst 2010-06-07]
This has been implemented as a[n experimental] plugin!