You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
548 B

import webbrowser
import urllib
def parser(subparsers, config):
parser = subparsers.add_parser('websearch',
help="launch a search on Google Scholar")
parser.add_argument("search_string", nargs = '*',
help="the search query (anything googly is possible)")
return parser
def command(config, ui, search_string):
print search_string
url = ("https://scholar.google.fr/scholar?q=%s&lr="
% (urllib.quote_plus(' '.join(search_string))))
webbrowser.open(url)