{"id":52728,"date":"2025-08-11T18:19:24","date_gmt":"2025-08-11T10:19:24","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/52728.html"},"modified":"2025-08-11T18:19:24","modified_gmt":"2025-08-11T10:19:24","slug":"%e5%ae%9e%e8%b7%b5811","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/52728.html","title":{"rendered":"\u5b9e\u8df5811"},"content":{"rendered":"<h2>\u4e00.\u00a0\u51fd\u6570\u5b9a\u4e49\u548c\u529f\u80fd<\/h2>\n<h3>get_html(url, timeout&#061;3)<\/h3>\n<ul>\n<li>\n<h4>\u529f\u80fd&#xff1a;<\/h4>\n<\/li>\n<li>\n<p>\u83b7\u53d6\u7f51\u9875\u7684HTML\u5185\u5bb9\u3002<\/p>\n<\/li>\n<li>\n<h4>\u53c2\u6570&#xff1a;<\/h4>\n<ul>\n<li>\n<p>url&#xff1a;\u76ee\u6807\u7f51\u9875\u7684URL\u3002<\/p>\n<\/li>\n<li>\n<p>timeout&#xff1a;\u8bf7\u6c42\u8d85\u65f6\u65f6\u95f4&#xff0c;\u9ed8\u8ba4\u4e3a3\u79d2\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<h4>\u5b9e\u73b0&#xff1a;<\/h4>\n<ul>\n<li>\n<p>\u4f7f\u7528requests.get\u53d1\u9001HTTP GET\u8bf7\u6c42\u3002<\/p>\n<\/li>\n<li>\n<p>\u8bbe\u7f6e\u7f16\u7801\u4e3a\u9875\u9762\u7684\u5b9e\u9645\u7f16\u7801&#xff08;r.apparent_encoding&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u68c0\u67e5\u8bf7\u6c42\u662f\u5426\u6210\u529f&#xff08;r.raise_for_status()&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u6210\u529f&#xff0c;\u8fd4\u56deHTML\u5185\u5bb9&#xff1b;\u5982\u679c\u5931\u8d25&#xff0c;\u6253\u5370\u9519\u8bef\u4fe1\u606f\u5e76\u8fd4\u56deNone\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>parse_table(html)<\/h3>\n<ul>\n<li>\n<h4>\u529f\u80fd&#xff1a;<\/h4>\n<\/li>\n<li>\n<p>\u4eceHTML\u4e2d\u89e3\u6790\u51fa\u201c\u8d64\u5cf0\u5168\u5e74\u6bcf\u6708\u5e73\u5747\u6c14\u6e29\u6570\u636e\u201d\u90e8\u5206&#xff0c;\u5e76\u63d0\u53d6\u8868\u683c\u6570\u636e\u3002<\/p>\n<\/li>\n<li>\n<h4>\u53c2\u6570&#xff1a;<\/h4>\n<ul>\n<li>\n<p>html&#xff1a;\u7f51\u9875\u7684HTML\u5185\u5bb9\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<h4>\u5b9e\u73b0&#xff1a;<\/h4>\n<ul>\n<li>\n<p>\u4f7f\u7528BeautifulSoup\u89e3\u6790HTML\u3002<\/p>\n<\/li>\n<li>\n<p>\u67e5\u627e\u201c\u8d64\u5cf0\u5168\u5e74\u6bcf\u6708\u5e73\u5747\u6c14\u6e29\u6570\u636e\u201d\u90e8\u5206\u7684\u8d77\u59cb\u548c\u7ed3\u675f\u6807\u8bb0\u3002<\/p>\n<\/li>\n<li>\n<p>\u63d0\u53d6\u8fd9\u90e8\u5206\u6587\u672c\u5185\u5bb9\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u8868\u683c\u4e2d\u7684\u6570\u636e&#xff08;\u6708\u4efd\u3001\u9ad8\u6e29\u3001\u4f4e\u6e29\u3001\u7a7a\u6c14\u3001\u80fd\u89c1\u5ea6\u3001\u98ce\u901f\u3001\u603b\u964d\u96e8&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5c06\u63d0\u53d6\u7684\u6570\u636e\u5b58\u50a8\u4e3a\u4e8c\u7ef4\u5217\u8868&#xff08;\u7b2c\u4e00\u884c\u4e3a\u8868\u5934&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>save_csv(data, path)<\/h3>\n<ul>\n<li>\n<h4>\u529f\u80fd&#xff1a;<\/h4>\n<\/li>\n<li>\n<p>\u5c06\u63d0\u53d6\u7684\u6570\u636e\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<h4>\u53c2\u6570&#xff1a;<\/h4>\n<ul>\n<li>\n<p>data&#xff1a;\u63d0\u53d6\u7684\u6570\u636e&#xff0c;\u4ee5\u4e8c\u7ef4\u5217\u8868\u5f62\u5f0f\u5b58\u50a8\u3002<\/p>\n<\/li>\n<li>\n<p>path&#xff1a;\u4fdd\u5b58\u7684\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<h4>\u5b9e\u73b0&#xff1a;<\/h4>\n<ul>\n<li>\n<p>\u4f7f\u7528csv.writer\u5c06\u6570\u636e\u5199\u5165CSV\u6587\u4ef6\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>\u4e8c.\u00a0\u4e3b\u7a0b\u5e8f\u903b\u8f91<\/h2>\n<p>if __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    url &#061; &#034;https:\/\/www.tianqi24.com\/chifeng\/history.html&#034;<br \/>\n    html &#061; get_html(url)<br \/>\n    if html:<br \/>\n        data &#061; parse_table(html)<br \/>\n        if data:<br \/>\n            save_csv(data, &#034;chifeng.csv&#034;)<br \/>\n            print(&#034;Data saved to chifeng.csv&#034;)<br \/>\n        else:<br \/>\n            print(&#034;No data to save.&#034;)<\/p>\n<ul>\n<li>\n<h4>\u6d41\u7a0b&#xff1a;<\/h4>\n<li>\n<p>\u5b9a\u4e49\u76ee\u6807URL\u3002<\/p>\n<\/li>\n<li>\n<p>\u8c03\u7528get_html\u83b7\u53d6\u7f51\u9875HTML\u5185\u5bb9\u3002<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u6210\u529f\u83b7\u53d6HTML\u5185\u5bb9&#xff0c;\u8c03\u7528parse_table\u89e3\u6790\u6570\u636e\u3002<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u89e3\u6790\u5230\u6570\u636e&#xff0c;\u8c03\u7528save_csv\u5c06\u6570\u636e\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>\u6253\u5370\u4fdd\u5b58\u6210\u529f\u6216\u5931\u8d25\u7684\u4fe1\u606f\u3002<\/p>\n<\/li>\n<\/li>\n<\/ul>\n<h2>\u4e09.\u00a0\u4ee3\u7801\u7684\u5173\u952e\u70b9<\/h2>\n<h3>get_html\u51fd\u6570<\/h3>\n<ul>\n<li>\n<p>\u901a\u8fc7requests.get\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\u3002<\/p>\n<\/li>\n<li>\n<p>\u68c0\u67e5\u8bf7\u6c42\u662f\u5426\u6210\u529f&#xff08;r.raise_for_status()&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u8bbe\u7f6e\u7f16\u7801\u4e3a\u9875\u9762\u7684\u5b9e\u9645\u7f16\u7801&#xff08;r.apparent_encoding&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>parse_table\u51fd\u6570<\/h3>\n<ul>\n<li>\n<p>\u4f7f\u7528BeautifulSoup\u89e3\u6790HTML\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u8868\u683c\u6570\u636e\u3002<\/p>\n<ul>\n<li>\n<p>\u6b63\u5219\u8868\u8fbe\u5f0fr&#034;(\\\\d{4}\u5e74\\\\d{2}\u6708)\\\\s&#043;(-?\\\\d&#043;\u2103)\\\\s&#043;(-?\\\\d&#043;\u2103)\\\\s&#043;(\\\\d&#043; \\\\w&#043;)\\\\s&#043;(\\\\d&#043;\\\\.\\\\d&#043;km)\\\\s&#043;(\\\\d&#043;\\\\.\\\\d&#043;km\/h)\\\\s&#043;(\\\\d&#043;\\\\.?\\\\d*)&#034;&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5339\u914d\u6708\u4efd&#xff08;\u59822024\u5e7401\u6708&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5339\u914d\u9ad8\u6e29\u548c\u4f4e\u6e29&#xff08;\u5982-3\u2103&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5339\u914d\u7a7a\u6c14\u8d28\u91cf&#xff08;\u598253 \u4f18&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5339\u914d\u80fd\u89c1\u5ea6&#xff08;\u598229.7km&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5339\u914d\u98ce\u901f&#xff08;\u59829.5km\/h&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>\u5339\u914d\u603b\u964d\u96e8\u91cf&#xff08;\u59820&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>save_csv\u51fd\u6570<\/h3>\n<ul>\n<li>\n<p>\u4f7f\u7528csv.writer\u5c06\u6570\u636e\u5199\u5165CSV\u6587\u4ef6\u3002<\/p>\n<\/li>\n<\/ul>\n<h2>\u56db.\u00a0\u4ee3\u7801\u7684\u8fd0\u884c\u7ed3\u679c<\/h2>\n<ul>\n<li>\n<p>\u5982\u679c\u7f51\u9875\u5185\u5bb9\u6b63\u5e38\u83b7\u53d6\u4e14\u89e3\u6790\u6210\u529f&#xff0c;\u4f1a\u751f\u6210\u4e00\u4e2a\u540d\u4e3achifeng.csv\u7684\u6587\u4ef6&#xff0c;\u5185\u5bb9\u5982\u4e0b&#xff1a;<\/p>\n<p>\u6708\u4efd,\u9ad8\u6e29,\u4f4e\u6e29,\u7a7a\u6c14,\u80fd\u89c1\u5ea6,\u98ce\u901f,\u603b\u964d\u96e8<br \/>\n2024\u5e7401\u6708,-3\u2103,-16\u2103,53 \u4f18,29.7km,9.5km\/h,0<br \/>\n2024\u5e7402\u6708,1\u2103,-13\u2103,58 \u4f18,28.2km,10.9km\/h,0.4<br \/>\n&#8230;\n<\/li>\n<li>\n<p>\u5982\u679c\u7f51\u9875\u5185\u5bb9\u83b7\u53d6\u5931\u8d25\u6216\u89e3\u6790\u5931\u8d25&#xff0c;\u4f1a\u6253\u5370\u76f8\u5e94\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n<\/li>\n<\/ul>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"586\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811101922-6899c3aa1601a.png\" width=\"628\" \/><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"332\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811101923-6899c3ab47205.png\" width=\"485\" \/><\/p>\n<\/p>\n<h2>\u4e94\u3001\u6570\u636e\u5904\u7406<\/h2>\n<h3>1.\u5220\u9664\u5305\u542b\u6709\u96f6\u7684\u884c<\/h3>\n<p>import pandas as pd<br \/>\nimport numpy as np<br \/>\n# \u8bfb\u53d6 CSV \u6587\u4ef6<br \/>\ndf &#061; pd.read_csv(&#034;chifeng.csv&#034;)<br \/>\n# \u5c06 0 \u66ff\u6362\u4e3a NaN<br \/>\ndf.replace(0, np.nan, inplace&#061;True)<br \/>\n# \u5220\u9664\u5305\u542b NaN \u7684\u884c<br \/>\nnew_df &#061; df.dropna()<br \/>\n# \u6253\u5370\u5904\u7406\u540e\u7684\u6570\u636e<br \/>\nprint(new_df.to_string())<\/p>\n<h3>2.\u7528\u6307\u5b9a\u5185\u5bb9\u6765\u66ff\u6362\u4e00\u4e9b\u7a7a\u5b57\u6bb5<\/h3>\n<p>#\u7528\u6307\u5b9a\u5185\u5bb9\u6765\u66ff\u6362\u4e00\u4e9b\u7a7a\u5b57\u6bb5<br \/>\nimport pandas as pd<br \/>\n# \u8bfb\u53d6 CSV \u6587\u4ef6<br \/>\ndf &#061; pd.read_csv(&#034;chifeng.csv&#034;)<br \/>\n# \u5c06 0 \u66ff\u6362\u4e3a &#039;\u96f6&#039;<br \/>\nnew_df &#061; df.replace(0, &#039;\u96f6&#039;)<br \/>\n# \u6253\u5370\u5904\u7406\u540e\u7684\u6570\u636e<br \/>\nprint(new_df.to_string())<\/p>\n<h3>3.\u8ba1\u7b97\u5217\u7684\u5747\u503c\u66ff\u6362\u7a7a\u5355\u5143\u683c<\/h3>\n<p>#\u8ba1\u7b97\u5217\u7684\u5747\u503c\u66ff\u6362\u7a7a\u5355\u5143\u683c<br \/>\nimport pandas as pd<br \/>\n# \u8bfb\u53d6 CSV \u6587\u4ef6<br \/>\ndf &#061; pd.read_csv(&#034;chifeng.csv&#034;)<br \/>\n# \u8ba1\u7b97\u6bcf\u4e00\u5217\u7684\u5747\u503c&#xff0c;\u5ffd\u7565\u975e\u6570\u503c\u5217\u548c NaN \u503c<br \/>\ncolumn_means &#061; df.mean()<br \/>\n# \u904d\u5386\u6bcf\u4e00\u5217&#xff0c;\u5c06 0 \u66ff\u6362\u4e3a\u8be5\u5217\u7684\u5747\u503c<br \/>\nfor column in df.columns:<br \/>\n    # \u68c0\u67e5\u5217\u662f\u5426\u4e3a\u6570\u503c\u7c7b\u578b<br \/>\n    if pd.api.types.is_numeric_dtype(df[column]):<br \/>\n        # \u5c06 0 \u66ff\u6362\u4e3a\u8be5\u5217\u7684\u5747\u503c<br \/>\n        df[column] &#061; df[column].replace(0, column_means[column])<br \/>\n# \u6253\u5370\u5904\u7406\u540e\u7684\u6570\u636e<br \/>\nprint(df.to_string())<\/p>\n<h3>4.\u8ba1\u7b97\u5217\u7684\u4e2d\u4f4d\u6570\u66ff\u6362\u7a7a\u5355\u5143\u683c<\/h3>\n<p>#\u8ba1\u7b97\u5217\u7684\u4e2d\u4f4d\u6570\u66ff\u6362\u7a7a\u5355\u5143\u683c<br \/>\nimport pandas as pd<br \/>\n# \u8bfb\u53d6 CSV \u6587\u4ef6<br \/>\ndf &#061; pd.read_csv(&#034;chifeng.csv&#034;)<br \/>\n# \u8ba1\u7b97\u6bcf\u4e00\u5217\u7684\u4e2d\u4f4d\u6570&#xff0c;\u5ffd\u7565\u975e\u6570\u503c\u5217\u548c NaN \u503c<br \/>\ncolumn_medians &#061; df.median()<br \/>\n# \u904d\u5386\u6bcf\u4e00\u5217&#xff0c;\u5c06 0 \u66ff\u6362\u4e3a\u8be5\u5217\u7684\u4e2d\u4f4d\u6570<br \/>\nfor column in df.columns:<br \/>\n    # \u68c0\u67e5\u5217\u662f\u5426\u4e3a\u6570\u503c\u7c7b\u578b<br \/>\n    if pd.api.types.is_numeric_dtype(df[column]):<br \/>\n        # \u5c06 0 \u66ff\u6362\u4e3a\u8be5\u5217\u7684\u4e2d\u4f4d\u6570<br \/>\n        df[column] &#061; df[column].replace(0, column_medians[column])<br \/>\n# \u6253\u5370\u5904\u7406\u540e\u7684\u6570\u636e<br \/>\nprint(df.to_string())<\/p>\n<h2>\u516d\u3001\u56fe\u50cf<\/h2>\n<p>1.\u521b\u5efa\u67f1\u72b6\u56fe<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<p># \u6bcf\u4e2a\u6708\u7684\u7a7a\u6c14\u8d28\u91cf\u6307\u6570&#xff08;AQI&#xff09;<br \/>\naqi_data &#061; {<br \/>\n    &#034;1&#034;: 53,<br \/>\n    &#034;2&#034;: 58,<br \/>\n    &#034;4&#034;: 50,<br \/>\n    &#034;5&#034;: 55,<br \/>\n    &#034;6&#034;: 38,<br \/>\n    &#034;7&#034;: 35,<br \/>\n    &#034;8&#034;: 31,<br \/>\n    &#034;9&#034;: 30,<br \/>\n    &#034;10&#034;: 37,<br \/>\n    &#034;11&#034;: 52,<br \/>\n    &#034;12&#034;: 30<br \/>\n}<br \/>\n# \u5c06\u6570\u636e\u8f6c\u6362\u4e3a\u5217\u8868<br \/>\nmonths &#061; list(aqi_data.keys())<br \/>\naqi &#061; list(aqi_data.values())<br \/>\nplt.figure(figsize&#061;(10, 6))<br \/>\nplt.bar(months, aqi, color&#061;&#039;skyblue&#039;)<br \/>\nplt.title(&#039;Monthly AQI&#039;)<br \/>\nplt.xlabel(&#039;Month&#039;)<br \/>\nplt.ylabel(&#039;AQI&#039;)<br \/>\nplt.show()<\/p>\n<p>2.\u521b\u5efa\u997c\u56fe<\/p>\n<p>plt.figure(figsize&#061;(8, 8))<br \/>\nplt.pie(aqi, labels&#061;months)<br \/>\nplt.title(&#039;AQI Distribution&#039;)<br \/>\nplt.show()<\/p>\n<p>3.\u521b\u5efa\u6c34\u5e73\u67f1\u72b6\u56fe&#xff08;barh&#xff09;<\/p>\n<p>plt.figure(figsize&#061;(10, 6))<br \/>\nplt.barh(months, aqi, color&#061;&#039;green&#039;)<br \/>\nplt.title(&#039;Monthly AQI (Horizontal Bar)&#039;)<br \/>\nplt.xlabel(&#039;AQI&#039;)<br \/>\nplt.ylabel(&#039;Month&#039;)<br \/>\nplt.show()<\/p>\n<p>4.\u521b\u5efa\u6298\u7ebf\u56fe<\/p>\n<p>plt.figure(figsize&#061;(10, 6))<br \/>\nplt.plot(months, aqi, marker&#061;&#039;o&#039;, color&#061;&#039;red&#039;)<br \/>\nplt.title(&#039;Monthly AQI Line Chart&#039;)<br \/>\nplt.xlabel(&#039;Month&#039;)<br \/>\nplt.ylabel(&#039;AQI&#039;)<br \/>\nplt.show()<\/p>\n<p>5.\u521b\u5efa\u6563\u70b9\u56fe<\/p>\n<p>plt.figure(figsize&#061;(10, 6))<br \/>\nplt.scatter(months, aqi, color&#061;&#039;hotpink&#039;)<br \/>\nplt.title(&#039;Monthly AQI Scatter Plot&#039;)<br \/>\nplt.xlabel(&#039;Month&#039;)<br \/>\nplt.ylabel(&#039;AQI&#039;)<br \/>\nplt.show()<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb5\u6b21\u3002\u8be5\u7a0b\u5e8f\u5b9e\u73b0\u4e86\u4ece\u7f51\u9875\u6293\u53d6\u8d64\u5cf0\u5e02\u6708\u5ea6\u6c14\u8c61\u6570\u636e\u5e76\u8fdb\u884c\u5206\u6790\u5904\u7406\u7684\u529f\u80fd\u3002\u4e3b\u8981\u5305\u542b\u4e09\u4e2a\u6838\u5fc3\u51fd\u6570\uff1aget_html()\u901a\u8fc7requests\u5e93\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff0cparse_table()\u4f7f\u7528BeautifulSoup\u548c\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u6c14\u6e29\u7b49\u8868\u683c\u6570\u636e\uff0csave_csv()\u5c06\u6570\u636e\u5b58\u50a8\u4e3aCSV\u6587\u4ef6\u3002\u7a0b\u5e8f\u8fd8\u63d0\u4f9b\u4e86\u6570\u636e\u5904\u7406\u529f\u80fd\uff0c\u5305\u62ec\u5220\u9664\u542b\u96f6\u884c\u3001\u66ff\u6362\u7a7a\u503c\uff08\u5747\u503c\/\u4e2d\u4f4d\u6570\uff09\u4ee5\u53ca\u751f\u6210\u591a\u79cd\u53ef\u89c6\u5316\u56fe\u8868\uff08\u67f1\u72b6\u56fe\u3001\u997c\u56fe\u7b49\uff09\u6765\u5c55\u793a\u7a7a\u6c14\u8d28\u91cf\u6307\u6570\u3002\u6574\u4e2a\u6d41\u7a0b\u5b9e\u73b0\u4e86\u4ece\u6570\u636e\u91c7\u96c6\u3001\u6e05\u6d17\u5230\u5206\u6790\u53ef\u89c6\u5316\u7684\u5b8c\u6574\u95ed\u73af\u3002<\/p>\n","protected":false},"author":2,"featured_media":52726,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2468,1818,4278,81],"topic":[],"class_list":["post-52728","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-matplotlib","tag-numpy","tag-pandas","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5b9e\u8df5811 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/52728.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5b9e\u8df5811 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb5\u6b21\u3002\u8be5\u7a0b\u5e8f\u5b9e\u73b0\u4e86\u4ece\u7f51\u9875\u6293\u53d6\u8d64\u5cf0\u5e02\u6708\u5ea6\u6c14\u8c61\u6570\u636e\u5e76\u8fdb\u884c\u5206\u6790\u5904\u7406\u7684\u529f\u80fd\u3002\u4e3b\u8981\u5305\u542b\u4e09\u4e2a\u6838\u5fc3\u51fd\u6570\uff1aget_html()\u901a\u8fc7requests\u5e93\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff0cparse_table()\u4f7f\u7528BeautifulSoup\u548c\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u6c14\u6e29\u7b49\u8868\u683c\u6570\u636e\uff0csave_csv()\u5c06\u6570\u636e\u5b58\u50a8\u4e3aCSV\u6587\u4ef6\u3002\u7a0b\u5e8f\u8fd8\u63d0\u4f9b\u4e86\u6570\u636e\u5904\u7406\u529f\u80fd\uff0c\u5305\u62ec\u5220\u9664\u542b\u96f6\u884c\u3001\u66ff\u6362\u7a7a\u503c\uff08\u5747\u503c\/\u4e2d\u4f4d\u6570\uff09\u4ee5\u53ca\u751f\u6210\u591a\u79cd\u53ef\u89c6\u5316\u56fe\u8868\uff08\u67f1\u72b6\u56fe\u3001\u997c\u56fe\u7b49\uff09\u6765\u5c55\u793a\u7a7a\u6c14\u8d28\u91cf\u6307\u6570\u3002\u6574\u4e2a\u6d41\u7a0b\u5b9e\u73b0\u4e86\u4ece\u6570\u636e\u91c7\u96c6\u3001\u6e05\u6d17\u5230\u5206\u6790\u53ef\u89c6\u5316\u7684\u5b8c\u6574\u95ed\u73af\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/52728.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-11T10:19:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811101922-6899c3aa1601a.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/52728.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/52728.html\",\"name\":\"\u5b9e\u8df5811 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-11T10:19:24+00:00\",\"dateModified\":\"2025-08-11T10:19:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/52728.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/52728.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/52728.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5b9e\u8df5811\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5b9e\u8df5811 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/52728.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5b9e\u8df5811 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb5\u6b21\u3002\u8be5\u7a0b\u5e8f\u5b9e\u73b0\u4e86\u4ece\u7f51\u9875\u6293\u53d6\u8d64\u5cf0\u5e02\u6708\u5ea6\u6c14\u8c61\u6570\u636e\u5e76\u8fdb\u884c\u5206\u6790\u5904\u7406\u7684\u529f\u80fd\u3002\u4e3b\u8981\u5305\u542b\u4e09\u4e2a\u6838\u5fc3\u51fd\u6570\uff1aget_html()\u901a\u8fc7requests\u5e93\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff0cparse_table()\u4f7f\u7528BeautifulSoup\u548c\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u6c14\u6e29\u7b49\u8868\u683c\u6570\u636e\uff0csave_csv()\u5c06\u6570\u636e\u5b58\u50a8\u4e3aCSV\u6587\u4ef6\u3002\u7a0b\u5e8f\u8fd8\u63d0\u4f9b\u4e86\u6570\u636e\u5904\u7406\u529f\u80fd\uff0c\u5305\u62ec\u5220\u9664\u542b\u96f6\u884c\u3001\u66ff\u6362\u7a7a\u503c\uff08\u5747\u503c\/\u4e2d\u4f4d\u6570\uff09\u4ee5\u53ca\u751f\u6210\u591a\u79cd\u53ef\u89c6\u5316\u56fe\u8868\uff08\u67f1\u72b6\u56fe\u3001\u997c\u56fe\u7b49\uff09\u6765\u5c55\u793a\u7a7a\u6c14\u8d28\u91cf\u6307\u6570\u3002\u6574\u4e2a\u6d41\u7a0b\u5b9e\u73b0\u4e86\u4ece\u6570\u636e\u91c7\u96c6\u3001\u6e05\u6d17\u5230\u5206\u6790\u53ef\u89c6\u5316\u7684\u5b8c\u6574\u95ed\u73af\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/52728.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-11T10:19:24+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250811101922-6899c3aa1601a.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/52728.html","url":"https:\/\/www.wsisp.com\/helps\/52728.html","name":"\u5b9e\u8df5811 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-11T10:19:24+00:00","dateModified":"2025-08-11T10:19:24+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/52728.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/52728.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/52728.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5b9e\u8df5811"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/52728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=52728"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/52728\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/52726"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=52728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=52728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=52728"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=52728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}