code-dumps/py/url-check-urllib.py
2023-03-29 13:59:25 +08:00

7 lines
156 B
Python
Executable File

#!/usr/bin/python3
from urllib.request import urlopen
url = "https://stats.oecd.org/"
with urlopen(url) as response:
body = response.read()
print(body)