#!/usr/bin/env python3
"""Check yushui date format"""
import requests
from bs4 import BeautifulSoup

r = requests.get("http://www.yushui.gov.cn/yushui/zwgg/list.shtml",
                  headers={"User-Agent": "Mozilla/5.0"}, timeout=15)
r.encoding = "utf-8"
soup = BeautifulSoup(r.text, "html.parser")
for li in soup.select("div.page_list ul li")[:5]:
    sp = li.find("span", class_="time")
    if sp:
        print(f"  span.time: {repr(sp.get_text(strip=True))}")
    d_span = li.find("span", class_="date")
    if d_span:
        print(f"  span.date: {repr(d_span.get_text(strip=True))}")
