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.

11 lines
426 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", help="the search query (anything googly is possible)")
return parser
def command(config, search_string):
url = 'https://scholar.google.fr/scholar?q={}&lr='.format(urllib.quote_plus(search_string))
webbrowser.open(url)