pyperclip,webbrowser

import webbrowser,sys,pyperclip #pyperclip可以跨平台复制粘贴

if len(sys.argv) > 1:
    address = ' '.join(sys.argv[1:])
else:
    address = pyperclip.paste()  #粘贴

webbrowser.open('https://www.baidu.com/baidu?wd='+address)
webbrowser.open('https://www.sogou.com/web?query='+address)
webbrowser.open('https://www.gobaidugle.com/search4.php?keyword='+address+'&one=baidu&two=google&three=sogou&four=so')
webbrowser.open('http://www.chongbuluo.com/search.php?mod=forum&searchid=21&orderby=lastpost&ascdesc=desc&searchsubmit=yes&kw='+address)

你可能感兴趣的:(pyperclip,webbrowser)