(*´ω`)外部ライブラリをインストールする
【実行結果】
【解説】
requestsは外部ライブラリなので先ずは
コマンドプロンプトで以下を入力しインストールする。
py -m pip install requests
次にimport requestsを行う
このプログラムは指定したURLのHTML構造をダウンロード
して表示するものである。
【コード】
import requests
response = requests.get('https://www.python.org/download/')
text = response.text
print(text)
print(' ∧ ∧ URLの取得')
print('( ゚Д゚)')
print('海と猫が好き')
print('( ゚Д゚)')
print('海と猫が好き')