Last active
January 6, 2020 12:01
-
-
Save gothedistance/28f12c322cbcdc092ab477f925a436a1 to your computer and use it in GitHub Desktop.
PythonでYahooにアクセスしてレスポンスを全て文字列で返すコード
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
url = 'https://yahoo.co.jp' | |
req = urllib.request.Request(url) | |
with urllib.request.urlopen(req) as res: | |
body = res.read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment