code-dumps/py/url-check-urllib.py

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)