Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Search DuckDuckGo in Google Chrome for iOS
import webbrowser
import urllib
# http://duckduckgo.com/?q=asdf
ddg_url = "googlechromes://duckduckgo.com/?"
query_url = "q="
# input
prompt = "> "
query = raw_input("Query: \n" + prompt)
# url encode
query = urllib.quote(query)
# open in chrome
webbrowser.open(ddg_url + query_url + query)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment