Skip to content

Instantly share code, notes, and snippets.

@nootanghimire
Created August 6, 2013 16:33
Show Gist options
  • Save nootanghimire/6166151 to your computer and use it in GitHub Desktop.
Save nootanghimire/6166151 to your computer and use it in GitHub Desktop.
#ducky.py -- returns the first website searched by
#duckduckgo
#nootan.ghimire@gmail.com
import webbrowser
import sys
#print (sys.argv)
lst = sys.argv
if(len(lst)<=1):
search_str = input("Enter search term: ")
else:
search_str = lst[1]
url = 'https://www.duckduckgo.com/?q=' + search_str + " !"
webbrowser.open(url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment