{"id":451,"date":"2025-03-30T08:25:48","date_gmt":"2025-03-30T00:25:48","guid":{"rendered":"https:\/\/www.subkme.com\/?p=451"},"modified":"2025-08-07T20:35:17","modified_gmt":"2025-08-07T12:35:17","slug":"%e5%bc%80%e9%97%a8%e7%ba%a2%e8%87%aa%e5%8a%a8%e7%bb%9f%e8%ae%a1%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/subk.me\/?p=451","title":{"rendered":"\u5f00\u95e8\u7ea2\u81ea\u52a8\u7edf\u8ba1\u4ee3\u7801"},"content":{"rendered":"<blockquote>\n<p>\u5904\u7406\u5f00\u95e8\u7ea2\u901a\u62a5\u6570\u636e\uff0c\u81ea\u52a8\u6458\u5f55\u76f8\u5173\u6570\u636e\u548c\u901a\u62a5\u3002<\/p>\n<\/blockquote>\n<pre><code># Author: subk\n# Time: 2024\/1\/10 16:53\n# Desc: \u5904\u740625\u5e74\u96c6\u56e2\u5e02\u573a\u5f00\u95e8\u7ea2\u901a\u62a5\u6570\u636e\n# Version: 1.0\n\nimport requests\nimport smtplib\nfrom email.mime.text import MIMEText\nfrom email.mime.multipart import MIMEMultipart\nfrom datetime import datetime, timedelta\nfrom bs4 import BeautifulSoup\nimport re\nimport schedule\nimport time\n\n# \u7528\u6237\u914d\u7f6e\nusername = &quot;su@.XXXX.com&quot;\npassword = &quot;XXXXXX&quot;\nsmtp_server = &quot;smtp.XXX&quot;\nsmtp_port = 465  # SSL\u7aef\u53e3\nrecipients = [&quot;&quot;]  # \u6536\u4ef6\u4eba\u5217\u8868\n\ndef get_dates():\n    &quot;&quot;&quot;\n    \u83b7\u53d6\u4eca\u5929\u7684\u65e5\u671f\u548c\u6628\u5929\u7684\u65e5\u671f\u3002\n\n    Returns:\n        tuple: \u5305\u542b\u4eca\u5929\u65e5\u671f\uff08\u683c\u5f0f\uff1aYYYY\u5e74MM\u6708DD\u65e5\uff09\u548c\u6628\u5929\u65e5\u671f\uff08\u683c\u5f0f\uff1aYYYYMMDD\uff09\u7684\u5143\u7ec4\u3002\n    &quot;&quot;&quot;\n    today = datetime.now().strftime(&quot;%Y\u5e74%m\u6708%d\u65e5&quot;)\n    yesterday = (datetime.now() - timedelta(days=1)).strftime(&quot;%Y%m%d&quot;)\n    return today, yesterday\n\ndef fetch_web_content(url):\n    &quot;&quot;&quot;\n    \u6839\u636e\u7ed9\u5b9a\u7684URL\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\u3002\n\n    Args:\n        url (str): \u7f51\u9875\u7684URL\u5730\u5740\u3002\n\n    Returns:\n        str: \u7f51\u9875\u7684HTML\u5185\u5bb9\u3002\n\n    Raises:\n        SystemExit: \u5982\u679c\u8bf7\u6c42\u5931\u8d25\uff0c\u5219\u6253\u5370\u9519\u8bef\u4fe1\u606f\u5e76\u9000\u51fa\u7a0b\u5e8f\u3002\n    &quot;&quot;&quot;\n    try:\n        response = requests.get(url)\n        response.raise_for_status()\n        return response.text\n    except requests.exceptions.RequestException as e:\n        print(f&quot;\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\u5931\u8d25: {e}&quot;)\n        exit(1)\n\ndef parse_html(html_content, districts, match_list):\n    &quot;&quot;&quot;\n    \u89e3\u6790HTML\u5185\u5bb9\uff0c\u63d0\u53d6\u5404\u5730\u533a\u7684\u901a\u62a5\u5f31\u9879\u6570\u3001\u5339\u914d\u6570\u548c\u5177\u4f53\u5185\u5bb9\u3002\n\n    Args:\n        html_content (str): \u7f51\u9875\u7684HTML\u5185\u5bb9\u3002\n        districts (list): \u533a\u53bf\u540d\u79f0\u5217\u8868\u3002\n        match_list (list): \u9700\u8981\u5339\u914d\u7684\u5173\u952e\u5b57\u5217\u8868\u3002\n\n    Returns:\n        dict: \u5305\u542b\u5404\u533a\u53bf\u7edf\u8ba1\u4fe1\u606f\u7684\u5b57\u5178\u3002\n    &quot;&quot;&quot;\n    soup = BeautifulSoup(html_content, &quot;html.parser&quot;)\n    title_contents = soup.find_all(&quot;div&quot;, class_=&quot;title_content&quot;)\n\n    pattern = r&quot;\\d+\u3001([^\u5f00\u95e8\u7ea2]*)\u5f00\u95e8\u7ea2&quot;\n    district_data = {district: {&quot;count&quot;: 0, &quot;content&quot;: [], &quot;match_count&quot;: 0} for district in districts}\n\n    for div in title_contents:\n        green_fonts = div.find_all(&quot;font&quot;, color=&quot;green&quot;)\n        for font in green_fonts:\n            for district in districts:\n                if district in font.get_text():\n                    text_content = div.get_text()\n                    matched_content = re.findall(pattern, text_content)\n                    if matched_content:\n                        district_data[district][&quot;content&quot;].extend(matched_content)\n                        district_data[district][&quot;count&quot;] += len(matched_content)\n                        for item in matched_content:\n                            if any(match_item in item for match_item in match_list):\n                                district_data[district][&quot;match_count&quot;] += 1\n    return district_data\n\ndef build_stats_table(districts, district_data, match_list):\n    &quot;&quot;&quot;\n    \u6784\u5efa\u7edf\u8ba1\u4fe1\u606f\u7684HTML\u8868\u683c\uff0c\u5e76\u9ad8\u4eae\u663e\u793a\u6700\u5927\u503c\u6240\u5728\u7684\u5355\u5143\u683c\u3002\n\n    Args:\n        districts (list): \u533a\u53bf\u540d\u79f0\u5217\u8868\u3002\n        district_data (dict): \u5404\u533a\u53bf\u7684\u7edf\u8ba1\u4fe1\u606f\u5b57\u5178\u3002\n        match_list (list): \u9700\u8981\u5339\u914d\u7684\u5173\u952e\u5b57\u5217\u8868\u3002\n\n    Returns:\n        str: \u5305\u542b\u7edf\u8ba1\u4fe1\u606f\u7684HTML\u5b57\u7b26\u4e32\u3002\n    &quot;&quot;&quot;\n    match_list_html = &quot;&quot;.join(f&quot;\n&lt;li&gt;{item}&lt;\/li&gt;&quot; for item in match_list)\n    district_columns = &quot;&quot;.join(f&quot;\n&lt;th&gt;{district}&lt;\/th&gt;&quot; for district in districts)\n\n    # \u627e\u5230\u901a\u62a5\u5f31\u9879\u6570\u7684\u6700\u5927\u503c\n    max_weakness_count = max(district_data.values(), key=lambda x: x[&quot;count&quot;])[&quot;count&quot;]\n    max_match_count = max(district_data.values(), key=lambda x: x[&quot;match_count&quot;])[&quot;match_count&quot;]\n\n    count_values = &quot;&quot;\n    match_count_values = &quot;&quot;\n    content_values = &quot;&quot;\n\n    for district in districts:\n        count_style = &#039;style=&quot;background-color: lightgreen;&quot;&#039; if district_data[district][&quot;count&quot;] == max_weakness_count else &#039;&#039;\n        match_count_style = &#039;style=&quot;background-color: lightgreen;&quot;&#039; if district_data[district][&quot;match_count&quot;] == max_match_count else &#039;&#039;\n        count_values += f&quot;&lt;td {count_style}&gt;{district_data[district][&#039;count&#039;]}&lt;\/td&gt;&quot;\n        match_count_values += f&quot;&lt;td {match_count_style}&gt;{district_data[district][&#039;match_count&#039;]}&lt;\/td&gt;&quot;\n        content_values += f&quot;\n&lt;td&gt;{&#039;&lt;br&gt;&#039;.join(district_data[district][&#039;content&#039;])}&lt;\/td&gt;&quot;\n\n    stats_info = &quot;&quot;&quot;\n\n&lt;div&gt;\n\n&lt;p&gt;&lt;b&gt;\u8fd1\u671f11\u9879\u91cd\u70b9\u8ddf\u8e2a\u7684\u4ea7\u80fd\u9879\u76ee\uff1a&lt;\/b&gt;&lt;\/p&gt;\n\n&lt;ul&gt;\n                {}\n            &lt;\/ul&gt;\n\n&lt;p&gt;&lt;b&gt;\u7edf\u8ba1\u4fe1\u606f\uff1a&lt;\/b&gt;&lt;\/p&gt;\n            &lt;table border=&quot;1&quot; cellpadding=&quot;10&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 100%; text-align: center;&quot;&gt;\n                &lt;thead style=&quot;background-color: #0085d0; color: white;&quot;&gt;\n\n&lt;tr&gt;\n\n&lt;th&gt;&lt;b&gt;\u533a\u53bf&lt;\/b&gt;&lt;\/th&gt;\n                        {}\n                    &lt;\/tr&gt;\n                &lt;\/thead&gt;\n\n&lt;tbody&gt;\n                    &lt;tr style=&quot;background-color: #f9f9f9;&quot;&gt;\n\n&lt;td&gt;&lt;b&gt;\u901a\u62a5\u5f31\u9879\u6570&lt;\/b&gt;&lt;\/td&gt;\n                        {}\n                    &lt;\/tr&gt;\n                    &lt;tr style=&quot;background-color: #f9f9f9;&quot;&gt;\n\n&lt;td&gt;&lt;b&gt;\u4ea7\u80fd\u8ddf\u8e2a\u4e2d\u7684\u5339\u914d\u6570&lt;\/b&gt;&lt;\/td&gt;\n                        {}\n                    &lt;\/tr&gt;\n                    &lt;tr style=&quot;background-color: #f9f9f9;&quot;&gt;\n\n&lt;td&gt;&lt;b&gt;\u901a\u62a5\u7684\u5177\u4f53\u5f31\u9879&lt;\/b&gt;&lt;\/td&gt;\n                        {}\n                    &lt;\/tr&gt;\n                &lt;\/tbody&gt;\n            &lt;\/table&gt;\n            &lt;br&gt;&lt;br&gt;&lt;br&gt;\n        &lt;\/div&gt;\n    &quot;&quot;&quot;.format(match_list_html, district_columns, count_values, match_count_values, content_values)\n    return stats_info\n\ndef extract_district_data(soup):\n    &quot;&quot;&quot;\n    \u4eceHTML\u4e2d\u63d0\u53d6\u533a\u53bf\u7684\u5f97\u5206\u548c\u6392\u540d\u6570\u636e\u3002\n\n    Args:\n        soup (BeautifulSoup): \u89e3\u6790\u540e\u7684HTML\u5bf9\u8c61\u3002\n\n    Returns:\n        dict: \u5305\u542b\u533a\u53bf\u5f97\u5206\u548c\u6392\u540d\u7684\u6570\u636e\u5b57\u5178\u3002\n\n    Raises:\n        ValueError: \u5982\u679c\u65e0\u6cd5\u627e\u5230\u76ee\u6807\u8868\u683c\u6216\u8868\u683c\u7ed3\u6784\u4e0d\u7b26\u5408\u9884\u671f\u3002\n    &quot;&quot;&quot;\n    html_table = soup.find(&quot;div&quot;, class_=&quot;html_table&quot;)\n    if not html_table:\n        raise ValueError(&quot;\u672a\u627e\u5230\u76ee\u6807\u8868\u683c&quot;)\n\n    rows = html_table.find_all(&quot;tr&quot;)\n    if len(rows) &lt; 3:\n        raise ValueError(&quot;\u8868\u683c\u884c\u6570\u4e0d\u8db3&quot;)\n\n    headers = [th.text.strip() for th in rows[0].find_all(&quot;th&quot;)[1:]]  # \u533a\u53bf\u540d\u79f0\uff08\u8df3\u8fc7&quot;\u533a\u53bf&quot;\u5217\uff09\n    scores = [td.text.strip() for td in rows[1].find_all(&quot;td&quot;)[1:]]  # \u603b\u5f97\u5206\uff08\u4ece\u7b2c\u4e8c\u5217\u5f00\u59cb\uff09\n    ranks = [td.text.strip() for td in rows[2].find_all(&quot;td&quot;)[1:]]  # \u603b\u6392\u540d\uff08\u4ece\u7b2c\u4e8c\u5217\u5f00\u59cb\uff09\n\n    # \u68c0\u67e5\u662f\u5426\u6240\u6709\u5217\u90fd\u6709\u6570\u636e\n    if len(headers) != len(scores) or len(headers) != len(ranks):\n        raise ValueError(&quot;\u8868\u683c\u5217\u6570\u4e0d\u4e00\u81f4&quot;)\n\n    # \u6784\u5efa\u533a\u53bf\u6570\u636e\n    district_data = {\n        headers[i]: {&quot;score&quot;: float(scores[i]), &quot;rank&quot;: int(ranks[i])}\n        for i in range(len(headers))\n    }\n    return district_data\n\ndef highlight_text(html, keywords):\n    &quot;&quot;&quot;\n    \u5728HTML\u5185\u5bb9\u4e2d\u9ad8\u4eae\u663e\u793a\u6307\u5b9a\u7684\u5173\u952e\u5b57\u3002\n\n    Args:\n        html (str): HTML\u5185\u5bb9\u5b57\u7b26\u4e32\u3002\n        keywords (list): \u9700\u8981\u9ad8\u4eae\u663e\u793a\u7684\u5173\u952e\u5b57\u5217\u8868\u3002\n\n    Returns:\n        str: \u9ad8\u4eae\u663e\u793a\u540e\u7684HTML\u5185\u5bb9\u5b57\u7b26\u4e32\u3002\n    &quot;&quot;&quot;\n    for keyword in keywords:\n        if keyword == &quot;LS&quot;:\n            html = html.replace(keyword, f&#039;&lt;span style=&quot;background-color: orange;&quot;&gt;{keyword}&lt;\/span&gt;&#039;)\n    return html\n\ndef send_email(subject, body, recipients, username, password, smtp_server, smtp_port):\n    &quot;&quot;&quot;\n    \u53d1\u9001\u7535\u5b50\u90ae\u4ef6\u3002\n\n    Args:\n        subject (str): \u90ae\u4ef6\u4e3b\u9898\u3002\n        body (str): \u90ae\u4ef6\u6b63\u6587\uff08HTML\u683c\u5f0f\uff09\u3002\n        recipients (list): \u6536\u4ef6\u4eba\u5217\u8868\u3002\n        username (str): \u53d1\u4ef6\u4eba\u7528\u6237\u540d\u3002\n        password (str): \u53d1\u4ef6\u4eba\u5bc6\u7801\u3002\n        smtp_server (str): SMTP\u670d\u52a1\u5668\u5730\u5740\u3002\n        smtp_port (int): SMTP\u670d\u52a1\u5668\u7aef\u53e3\u53f7\u3002\n\n    Raises:\n        Exception: \u5982\u679c\u53d1\u9001\u90ae\u4ef6\u5931\u8d25\uff0c\u5219\u6253\u5370\u9519\u8bef\u4fe1\u606f\u3002\n    &quot;&quot;&quot;\n    message = MIMEMultipart()\n    message[&quot;From&quot;] = username\n    message[&quot;To&quot;] = &quot;, &quot;.join(recipients)\n    message[&quot;Subject&quot;] = subject\n\n    message.attach(MIMEText(body, &quot;html&quot;))\n\n    try:\n        with smtplib.SMTP_SSL(smtp_server, smtp_port) as server:\n            server.login(username, password)\n            server.sendmail(username, recipients, message.as_string())\n            print(&quot;\u90ae\u4ef6\u53d1\u9001\u6210\u529f\uff01&quot;)\n    except smtplib.SMTPException as e:\n        print(f&quot;\u53d1\u9001\u90ae\u4ef6\u5931\u8d25: {e}&quot;)\n\ndef job():\n    &quot;&quot;&quot;\n    \u6267\u884c\u4e3b\u4efb\u52a1\u7684\u51fd\u6570\uff0c\u5982\u679c\u6210\u529f\u5219\u8fd4\u56deTrue\uff0c\u5931\u8d25\u8fd4\u56deFalse\n    &quot;&quot;&quot;\n    try:\n        today, yesterday = get_dates()\n        url = f&quot;http:\/\/10.33.222.52:31002\/hamobile\/table\/mailReport?cfg_id=202&amp;flag=jtReport2&amp;day_time={yesterday}&quot;\n\n        html_content = fetch_web_content(url)\n        soup = BeautifulSoup(html_content, &quot;html.parser&quot;)\n\n        # \u5c1d\u8bd5\u63d0\u53d6\u533a\u53bf\u6570\u636e\uff0c\u5982\u679c\u5931\u8d25\u8bf4\u660e\u6570\u636e\u8fd8\u6ca1\u51fa\n        district_scores = extract_district_data(soup)\n\n        # \u5982\u679c\u80fd\u6267\u884c\u5230\u8fd9\u91cc\uff0c\u8bf4\u660e\u6570\u636e\u5df2\u7ecf\u51fa\u6765\u4e86\n        districts = [&quot;XX&quot;, &quot;XX&quot;]\n        match_list = [\n            &quot;\u76f4\u7ba1\u6728\u672c\u8d44\u6e90\u9500\u552e&quot;, &quot;\u4e24\u7ebf\u65b0\u589e\u6761\u6570&quot;, &quot;\u5546\u5ba2\u5e02\u573a\u8ba1\u8d39\u5bbd\u5e26\u65b0\u589e&quot;, &quot;\u653f\u4f01\u65b0\u5165\u7f51&quot;,\n            &quot;\u89e6\u8fbe\u7c7b\u5927\u6570\u636e\u4ea7\u54c1\u53d1\u9001\u91cf&quot;, &quot;\u4e91\u89c6\u8baf\u65b0\u589e\u7ec8\u7aef\u6570&quot;, &quot;\u548c\u5bf9\u8bb2\u65b0\u589e\u7ec8\u7aef\u6570&quot;, &quot;\u7535\u5b50\u5b66\u751f\u8bc1\u7528\u6237\u65b0\u589e&quot;,\n            &quot;\u89c6\u8054\u7f51\u65b0\u589e&quot;, &quot;FTTO\u65b0\u589e&quot;, &quot;24\u5e74\u53ca\u4ee5\u524d\u5b58\u91cf\u6b20\u8d39\u56de\u6536&quot;\n        ]\n\n        district_data = parse_html(html_content, districts, match_list)\n        stats_info = build_stats_table(districts, district_data, match_list)\n\n        # \u63d0\u53d6\u533a\u53bf\u6570\u636e\n        lian_shui_data = district_scores.get(&quot;\u6d9f\u6c34&quot;, {})\n        total_score = lian_shui_data.get(&quot;score&quot;, &quot;N\/A&quot;)\n        total_rank = lian_shui_data.get(&quot;rank&quot;, &quot;N\/A&quot;)\n\n        # \u627e\u5230\u6392\u540d\u5728LS\u4e4b\u524d\u7684\u5355\u4f4d\n        units_before = [\n            district for district, data in district_scores.items()\n            if data[&quot;rank&quot;] &lt; total_rank\n        ]\n        units_before_sorted = sorted(units_before, key=lambda x: district_scores[x][&quot;rank&quot;])\n\n        # LS\u901a\u62a5\u5f31\u9879\u6570\u548c\u4ea7\u80fd\u8ddf\u8e2a\u4e2d\u7684\u5339\u914d\u6570\n        lian_shui_weakness_count = district_data[&quot;\u6d9f\u6c34&quot;][&quot;count&quot;]\n        lian_shui_match_count = district_data[&quot;\u6d9f\u6c34&quot;][&quot;match_count&quot;]\n\n        # \u627e\u5230\u4ea7\u80fd\u8ddf\u8e2a\u4e2d\u7684\u5339\u914d\u6570\u6700\u5927\u503c\u5bf9\u5e94\u7684\u533a\u53bf\n        max_match_count = max(district_data.values(), key=lambda x: x[&quot;match_count&quot;])[&quot;match_count&quot;]\n        max_match_district = next((district for district, data in district_data.items() if data[&quot;match_count&quot;] == max_match_count), &quot;N\/A&quot;)\n\n        # \u6784\u5efa\u90ae\u4ef6\u5f00\u5934\u7684\u65b0\u5185\u5bb9\n        additional_info = f&quot;&quot;&quot;\n\n&lt;div&gt;\n\n&lt;p&gt;&lt;b&gt;LS\u6838\u5fc3\u4ea7\u54c1\u603b\u5f97\u5206\uff1a{total_score}\uff0c\u603b\u6392\u540d\uff1a{total_rank}\uff0c\u6392\u540d\u5728LS\u4e4b\u524d\u7684\u5355\u4f4d\uff1a{&#039;, &#039;.join(units_before_sorted)}&lt;\/b&gt;&lt;\/p&gt;\n\n&lt;p&gt;&lt;b&gt;LS\u901a\u62a5\u5f31\u9879\u6570\uff1a{lian_shui_weakness_count}\uff0c\u4ea7\u80fd\u8ddf\u8e2a\u4e2d\u7684\u5339\u914d\u6570\uff1a{lian_shui_match_count}\uff08\u5339\u914d\u6570\u6700\u591a\uff1a{max_match_district}\uff09&lt;\/b&gt;&lt;\/p&gt;\n            &lt;\/div&gt;\n        &quot;&quot;&quot;\n\n        html_content = highlight_text(html_content, districts)\n        html_content = additional_info + stats_info + html_content\n\n        subject = f&#039;\u3010\u62a2\u5148\u7248\u3011\u96c6\u56e2\u5e02\u573a&quot;\u5f00\u95e8\u7ea2&quot;\u4e13\u9879\u8425\u9500\u6d3b\u52a8\u901a\u62a5\uff08{yesterday}\uff09&#039;\n\n        # \u53d1\u9001\u6210\u529f\u7684\u90ae\u4ef6\n        send_email(subject, html_content, recipients, username, password, smtp_server, smtp_port)\n\n        return True  # \u6267\u884c\u6210\u529f\n\n    except Exception as e:\n        print(f&quot;\u6267\u884c\u5931\u8d25: {e}&quot;)\n        return False  # \u6267\u884c\u5931\u8d25\n\ndef main():\n    &quot;&quot;&quot;\n    \u4e3b\u51fd\u6570\uff0c\u8bbe\u7f6e\u5b9a\u65f6\u4efb\u52a1\u5e76\u7acb\u5373\u6267\u884c\u4e00\u6b21\u4efb\u52a1\n    &quot;&quot;&quot;\n    today = datetime.now().date()\n    task_executed_today = False  # \u6807\u5fd7\u53d8\u91cf\uff0c\u8bb0\u5f55\u5f53\u5929\u662f\u5426\u5df2\u7ecf\u6267\u884c\u8fc7\u4efb\u52a1\n\n    while True:\n        now = datetime.now()\n        if not task_executed_today and now.hour &gt;= 15:\n            success = job()\n            if success:\n                task_executed_today = True\n                print(f&quot;\u4efb\u52a1\u5728 {now} \u6210\u529f\u6267\u884c\uff0c\u4eca\u5929\u7684\u4efb\u52a1\u5df2\u5b8c\u6210&quot;)\n\n        # \u6bcf\u5206\u949f\u68c0\u67e5\u4e00\u6b21\u662f\u5426\u6709\u5f85\u6267\u884c\u7684\u4efb\u52a1\n        schedule.run_pending()\n        time.sleep(60)\n\n        # \u68c0\u67e5\u662f\u5426\u9700\u8981\u91cd\u7f6e\u4efb\u52a1\u6267\u884c\u6807\u5fd7\n        if datetime.now().date() &gt; today:\n            today = datetime.now().date()\n            task_executed_today = False\n            print(f&quot;\u65e5\u671f\u5df2\u66f4\u65b0\u4e3a {today}\uff0c\u91cd\u7f6e\u4efb\u52a1\u6267\u884c\u6807\u5fd7&quot;)\n\nif __name__ == &quot;__main__&quot;:\n    main()<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>\u5904\u7406\u5f00\u95e8\u7ea2\u901a\u62a5\u6570\u636e\uff0c\u81ea\u52a8\u6458\u5f55\u76f8\u5173\u6570\u636e\u548c\u901a\u62a5\u3002 # Author: subk # Time: 2024\/1\/10 [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[23],"class_list":["post-451","post","type-post","status-publish","format-standard","hentry","category-it","tag-python"],"_links":{"self":[{"href":"https:\/\/subk.me\/index.php?rest_route=\/wp\/v2\/posts\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/subk.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/subk.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/subk.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/subk.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=451"}],"version-history":[{"count":4,"href":"https:\/\/subk.me\/index.php?rest_route=\/wp\/v2\/posts\/451\/revisions"}],"predecessor-version":[{"id":455,"href":"https:\/\/subk.me\/index.php?rest_route=\/wp\/v2\/posts\/451\/revisions\/455"}],"wp:attachment":[{"href":"https:\/\/subk.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/subk.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/subk.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}