>>610
<5分で始めるクリップボードにコピーしたテキストを検索>
退屈なことはPythonにやらせよう編

#! python
import webbrowser, sys, pyperclip
if len(sys.argv) > 1:
# この下の1行は半角スペース4個分あけてから書く(半角スペースを開けなかった時のエラーメッセージは"IndentationError: expected an indented block")
keyword = ' '.join(sys.argv[1:])
else:
# この下の1行は半角スペース4個分あけてから書く
keyword = pyperclip.paste()
# ttpsをhttpsに変更して使ってね
webbrowser.open("ttps://www.deepl.com/translator#xx/ja/" + keyword)
webbrowser.open("ttps://stackoverflow.com/search?q=" + keyword)
webbrowser.open("ttps://qiita.com/search?q=" + keyword + "&sort=like")
webbrowser.open("ttps://teratail.com/search?q=" + keyword)
webbrowser.open("ttps://www.google.com/search?q=" + keyword)
# ttps://duckduckgo.com/bang_lite.html

# Automate the Boring Stuff with Python > Chapter 11 – Web Scraping > Step 3: Handle the Clipboard Content and Launch the Browser
# ttps://automatetheboringstuff.com/chapter11/
# RUNNING PROGRAMS
# ttps://automatetheboringstuff.com/2e/appendixb/
# 翻訳版:退屈なことはPythonにやらせよう ――ノンプログラマーにもできる自動化処理プログラミング Al Sweigart 著、相川 愛三 訳