import urllib.request
from datetime import datetime
import time


while True:
    now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    request = urllib.request.Request("http://www.baidu.com")
    with urllib.request.urlopen(request) as response:
        data = response.read()
        content = data.decode("utf-8")
        print(f"{now} {len(content)}")
    time.sleep(1)

