{"id":1025333,"date":"2024-12-31T10:33:24","date_gmt":"2024-12-31T02:33:24","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1025333.html"},"modified":"2024-12-31T10:33:26","modified_gmt":"2024-12-31T02:33:26","slug":"%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8python%e7%88%ac%e5%8f%96%e4%bc%98%e6%83%a0%e5%88%b8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1025333.html","title":{"rendered":"\u5982\u4f55\u5229\u7528python\u722c\u53d6\u4f18\u60e0\u5238"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/79fa7870-3984-468b-ac5a-6be48e5e8a8e.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u5229\u7528python\u722c\u53d6\u4f18\u60e0\u5238\" \/><\/p>\n<p><p> \u5982\u4f55\u5229\u7528python\u722c\u53d6\u4f18\u60e0\u5238<\/p>\n<\/p>\n<p><p><strong>\u5229\u7528Python\u722c\u53d6\u4f18\u60e0\u5238\u7684\u5173\u952e\u5728\u4e8e\uff1a\u9009\u62e9\u5408\u9002\u7684\u7f51\u7ad9\u3001\u5206\u6790\u7f51\u9875\u7ed3\u6784\u3001\u4f7f\u7528\u8bf7\u6c42\u5e93\u83b7\u53d6\u7f51\u9875\u6570\u636e\u3001\u89e3\u6790HTML\u5185\u5bb9\u3001\u5b58\u50a8\u548c\u7ba1\u7406\u6570\u636e\u3002<\/strong> \u5176\u4e2d\uff0c\u5206\u6790\u7f51\u9875\u7ed3\u6784\u662f\u81f3\u5173\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u56e0\u4e3a\u5b83\u51b3\u5b9a\u4e86\u4f60\u80fd\u5426\u6709\u6548\u5730\u63d0\u53d6\u51fa\u9700\u8981\u7684\u4fe1\u606f\u3002\u4f8b\u5982\uff0c\u5229\u7528\u6d4f\u89c8\u5668\u7684\u5f00\u53d1\u8005\u5de5\u5177\uff0c\u53ef\u4ee5\u67e5\u770b\u7f51\u9875\u7684HTML\u4ee3\u7801\u7ed3\u6784\uff0c\u4ece\u800c\u627e\u5230\u4f18\u60e0\u5238\u4fe1\u606f\u7684\u4f4d\u7f6e\u548c\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u9009\u62e9\u5408\u9002\u7684\u7f51\u7ad9<\/p>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u722c\u866b\u64cd\u4f5c\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u9009\u62e9\u5408\u9002\u7684\u7f51\u7ad9\u3002\u9009\u62e9\u7684\u7f51\u7ad9\u5e94\u5f53\u6709\u4e30\u5bcc\u7684\u4f18\u60e0\u5238\u4fe1\u606f\uff0c\u5e76\u4e14\u7f51\u7ad9\u7684\u5e03\u5c40\u548c\u7ed3\u6784\u5e94\u5f53\u76f8\u5bf9\u56fa\u5b9a\uff0c\u8fd9\u6837\u53ef\u4ee5\u63d0\u9ad8\u722c\u53d6\u6570\u636e\u7684\u7a33\u5b9a\u6027\u548c\u51c6\u786e\u6027\u3002\u4f8b\u5982\uff0c\u8bb8\u591a\u7535\u5546\u5e73\u53f0\u548c\u4f18\u60e0\u5238\u5e73\u53f0\u90fd\u4f1a\u5b9a\u671f\u53d1\u5e03\u5927\u91cf\u7684\u4f18\u60e0\u5238\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><p>\u9009\u62e9\u7f51\u7ad9\u65f6\uff0c\u8fd8\u9700\u8981\u6ce8\u610f\u8be5\u7f51\u7ad9\u7684robots.txt\u6587\u4ef6\uff0c\u786e\u4fdd\u81ea\u5df1\u722c\u53d6\u7684\u7f51\u7ad9\u5141\u8bb8\u722c\u866b\u7684\u8bbf\u95ee\u3002\u8bbf\u95eerobots.txt\u6587\u4ef6\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u201c\u7f51\u7ad9\u5730\u5740\/robots.txt\u201d\u8fdb\u884c\u67e5\u770b\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u5206\u6790\u7f51\u9875\u7ed3\u6784<\/p>\n<\/p>\n<p><p>\u5728\u9009\u62e9\u597d\u7f51\u7ad9\u4e4b\u540e\uff0c\u4e0b\u4e00\u6b65\u662f\u5206\u6790\u7f51\u9875\u7ed3\u6784\u3002\u4f7f\u7528\u6d4f\u89c8\u5668\u7684\u5f00\u53d1\u8005\u5de5\u5177\uff08\u901a\u5e38\u662f\u6309F12\u952e\uff09\u53ef\u4ee5\u67e5\u770b\u7f51\u9875\u7684HTML\u7ed3\u6784\u3002\u901a\u8fc7\u67e5\u770bHTML\u4ee3\u7801\uff0c\u53ef\u4ee5\u627e\u5230\u5305\u542b\u4f18\u60e0\u5238\u4fe1\u606f\u7684\u6807\u7b7e\u548c\u7c7b\u540d\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u5982\u679c\u4f18\u60e0\u5238\u4fe1\u606f\u5305\u542b\u5728\u4e00\u4e2a\u5e26\u6709\u7279\u5b9a\u7c7b\u540d\u7684div\u6807\u7b7e\u4e2d\uff0c\u53ef\u4ee5\u5728\u5f00\u53d1\u8005\u5de5\u5177\u4e2d\u627e\u5230\u8fd9\u4e9b\u6807\u7b7e\uff0c\u5e76\u8bb0\u5f55\u4e0b\u5b83\u4eec\u7684\u7c7b\u540d\u548c\u5c42\u7ea7\u5173\u7cfb\u3002\u8fd9\u6837\u5728\u5199\u722c\u866b\u4ee3\u7801\u65f6\uff0c\u53ef\u4ee5\u6839\u636e\u8fd9\u4e9b\u4fe1\u606f\u51c6\u786e\u5730\u63d0\u53d6\u51fa\u4f18\u60e0\u5238\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528\u8bf7\u6c42\u5e93\u83b7\u53d6\u7f51\u9875\u6570\u636e<\/p>\n<\/p>\n<p><p>\u5206\u6790\u5b8c\u7f51\u9875\u7ed3\u6784\u4e4b\u540e\uff0c\u63a5\u4e0b\u6765\u662f\u4f7f\u7528Python\u7684\u8bf7\u6c42\u5e93\uff08\u5982requests\uff09\u83b7\u53d6\u7f51\u9875\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528requests\u5e93\u83b7\u53d6\u7f51\u9875\u7684HTML\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>url = &#39;https:\/\/www.example.com\/coupons&#39;<\/p>\n<p>headers = {<\/p>\n<p>    &#39;User-Agent&#39;: &#39;Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/85.0.4183.102 Safari\/537.36&#39;<\/p>\n<p>}<\/p>\n<p>response = requests.get(url, headers=headers)<\/p>\n<p>if response.status_code == 200:<\/p>\n<p>    html_content = response.content<\/p>\n<p>    print(html_content)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;F<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>led to retrieve content. Status code: {response.status_code}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u76ee\u6807URL\uff0c\u5e76\u8bbe\u7f6e\u4e86\u8bf7\u6c42\u5934\u4e2d\u7684User-Agent\u5b57\u6bb5\uff0c\u4ee5\u6a21\u62df\u6d4f\u89c8\u5668\u7684\u8bf7\u6c42\u884c\u4e3a\u3002\u7136\u540e\u4f7f\u7528requests.get\u65b9\u6cd5\u53d1\u9001\u8bf7\u6c42\uff0c\u5e76\u83b7\u53d6\u7f51\u9875\u7684HTML\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u89e3\u6790HTML\u5185\u5bb9<\/p>\n<\/p>\n<p><p>\u83b7\u53d6\u7f51\u9875\u6570\u636e\u4e4b\u540e\uff0c\u63a5\u4e0b\u6765\u662f\u89e3\u6790HTML\u5185\u5bb9\u3002\u901a\u5e38\u4f7f\u7528BeautifulSoup\u5e93\u6765\u89e3\u6790HTML\uff0c\u5e76\u63d0\u53d6\u51fa\u9700\u8981\u7684\u4fe1\u606f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528BeautifulSoup\u5e93\u89e3\u6790HTML\u5185\u5bb9\uff0c\u5e76\u63d0\u53d6\u51fa\u4f18\u60e0\u5238\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bs4 import BeautifulSoup<\/p>\n<p>soup = BeautifulSoup(html_content, &#39;html.parser&#39;)<\/p>\n<p>coupons = soup.find_all(&#39;div&#39;, class_=&#39;coupon&#39;)<\/p>\n<p>for coupon in coupons:<\/p>\n<p>    title = coupon.find(&#39;h2&#39;).get_text()<\/p>\n<p>    discount = coupon.find(&#39;span&#39;, class_=&#39;discount&#39;).get_text()<\/p>\n<p>    expiration_date = coupon.find(&#39;span&#39;, class_=&#39;expiration-date&#39;).get_text()<\/p>\n<p>    print(f&quot;Title: {title}, Discount: {discount}, Expiration Date: {expiration_date}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528BeautifulSoup\u5e93\u89e3\u6790HTML\u5185\u5bb9\uff0c\u5e76\u627e\u5230\u6240\u6709\u5305\u542b\u4f18\u60e0\u5238\u4fe1\u606f\u7684div\u6807\u7b7e\u3002\u7136\u540e\u904d\u5386\u6bcf\u4e2a\u4f18\u60e0\u5238\u6807\u7b7e\uff0c\u63d0\u53d6\u51fa\u6807\u9898\u3001\u6298\u6263\u548c\u8fc7\u671f\u65e5\u671f\u7b49\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5b58\u50a8\u548c\u7ba1\u7406\u6570\u636e<\/p>\n<\/p>\n<p><p>\u63d0\u53d6\u51fa\u4f18\u60e0\u5238\u4fe1\u606f\u4e4b\u540e\uff0c\u6700\u540e\u4e00\u6b65\u662f\u5b58\u50a8\u548c\u7ba1\u7406\u6570\u636e\u3002\u53ef\u4ee5\u5c06\u6570\u636e\u5b58\u50a8\u5728\u6570\u636e\u5e93\u4e2d\uff0c\u6216\u8005\u4fdd\u5b58\u4e3aCSV\u3001JSON\u7b49\u683c\u5f0f\u7684\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u5c06\u4f18\u60e0\u5238\u4fe1\u606f\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import csv<\/p>\n<p>with open(&#39;coupons.csv&#39;, &#39;w&#39;, newline=&#39;&#39;, encoding=&#39;utf-8&#39;) as csvfile:<\/p>\n<p>    fieldnames = [&#39;Title&#39;, &#39;Discount&#39;, &#39;Expiration Date&#39;]<\/p>\n<p>    writer = csv.DictWriter(csvfile, fieldnames=fieldnames)<\/p>\n<p>    writer.writeheader()<\/p>\n<p>    for coupon in coupons:<\/p>\n<p>        writer.writerow({<\/p>\n<p>            &#39;Title&#39;: coupon.find(&#39;h2&#39;).get_text(),<\/p>\n<p>            &#39;Discount&#39;: coupon.find(&#39;span&#39;, class_=&#39;discount&#39;).get_text(),<\/p>\n<p>            &#39;Expiration Date&#39;: coupon.find(&#39;span&#39;, class_=&#39;expiration-date&#39;).get_text()<\/p>\n<p>        })<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528csv\u5e93\u5c06\u4f18\u60e0\u5238\u4fe1\u606f\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6\u3002\u5b9a\u4e49\u4e86CSV\u6587\u4ef6\u7684\u5b57\u6bb5\u540d\uff0c\u5e76\u5199\u5165\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u5904\u7406\u53cd\u722c\u866b\u673a\u5236<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u5f88\u591a\u7f51\u7ad9\u90fd\u4f1a\u6709\u53cd\u722c\u866b\u673a\u5236\uff0c\u6bd4\u5982\u901a\u8fc7\u68c0\u6d4b\u8bf7\u6c42\u9891\u7387\u3001\u68c0\u67e5User-Agent\u7b49\u65b9\u5f0f\u6765\u963b\u6b62\u722c\u866b\u3002\u56e0\u6b64\uff0c\u722c\u866b\u4ee3\u7801\u8fd8\u9700\u8981\u5904\u7406\u8fd9\u4e9b\u95ee\u9898\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u5728\u8bf7\u6c42\u4e4b\u95f4\u6dfb\u52a0\u968f\u673a\u7684\u5ef6\u8fdf\uff0c\u6a21\u62df\u4eba\u7c7b\u7684\u8bbf\u95ee\u884c\u4e3a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>import random<\/p>\n<p>time.sleep(random.uniform(1, 3))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216\u8005\u4f7f\u7528\u4ee3\u7406IP\uff0c\u907f\u514d\u88ab\u7f51\u7ad9\u68c0\u6d4b\u5230\u722c\u866b\u884c\u4e3a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">proxies = {<\/p>\n<p>    &#39;http&#39;: &#39;http:\/\/your_proxy_server:port&#39;,<\/p>\n<p>    &#39;https&#39;: &#39;https:\/\/your_proxy_server:port&#39;<\/p>\n<p>}<\/p>\n<p>response = requests.get(url, headers=headers, proxies=proxies)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e03\u3001\u5904\u7406\u52a8\u6001\u52a0\u8f7d\u5185\u5bb9<\/p>\n<\/p>\n<p><p>\u6709\u4e9b\u7f51\u7ad9\u7684\u5185\u5bb9\u662f\u901a\u8fc7JavaScript\u52a8\u6001\u52a0\u8f7d\u7684\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528\u9759\u6001\u7684\u8bf7\u6c42\u5e93\u53ef\u80fd\u65e0\u6cd5\u83b7\u53d6\u5230\u5b8c\u6574\u7684\u7f51\u9875\u5185\u5bb9\u3002\u53ef\u4ee5\u4f7f\u7528Selenium\u5e93\u6765\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\uff0c\u52a0\u8f7d\u52a8\u6001\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<p>driver = webdriver.Chrome()<\/p>\n<p>driver.get(&#39;https:\/\/www.example.com\/coupons&#39;)<\/p>\n<p>html_content = driver.page_source<\/p>\n<p>driver.quit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528Selenium\u5e93\u53ef\u4ee5\u52a0\u8f7d\u5e76\u6e32\u67d3\u7f51\u9875\u5185\u5bb9\uff0c\u7136\u540e\u83b7\u53d6\u5b8c\u6574\u7684HTML\u4ee3\u7801\u3002\u8fd9\u6837\u5c31\u80fd\u591f\u5904\u7406\u52a8\u6001\u52a0\u8f7d\u7684\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u6211\u4eec\u53ef\u4ee5\u5229\u7528Python\u722c\u53d6\u4f18\u60e0\u5238\u4fe1\u606f\u3002\u9009\u62e9\u5408\u9002\u7684\u7f51\u7ad9\u3001\u5206\u6790\u7f51\u9875\u7ed3\u6784\u3001\u4f7f\u7528\u8bf7\u6c42\u5e93\u83b7\u53d6\u7f51\u9875\u6570\u636e\u3001\u89e3\u6790HTML\u5185\u5bb9\u3001\u5b58\u50a8\u548c\u7ba1\u7406\u6570\u636e\u662f\u5173\u952e\u7684\u6b65\u9aa4\u3002\u540c\u65f6\uff0c\u8fd8\u9700\u8981\u5904\u7406\u53cd\u722c\u866b\u673a\u5236\u548c\u52a8\u6001\u52a0\u8f7d\u5185\u5bb9\u7b49\u95ee\u9898\u3002\u638c\u63e1\u8fd9\u4e9b\u6280\u5de7\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u9ad8\u6548\u5730\u722c\u53d6\u548c\u7ba1\u7406\u4f18\u60e0\u5238\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684Python\u5e93\u8fdb\u884c\u4f18\u60e0\u5238\u722c\u53d6\uff1f<\/strong><br \/>\u5728\u722c\u53d6\u4f18\u60e0\u5238\u65f6\uff0c\u9009\u62e9\u5408\u9002\u7684\u5e93\u81f3\u5173\u91cd\u8981\u3002\u5e38\u7528\u7684Python\u5e93\u5305\u62ecRequests\u3001BeautifulSoup\u548cScrapy\u3002Requests\u7528\u4e8e\u53d1\u9001HTTP\u8bf7\u6c42\uff0c\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff1bBeautifulSoup\u5219\u53ef\u4ee5\u89e3\u6790HTML\u6587\u6863\uff0c\u63d0\u53d6\u6240\u9700\u7684\u4f18\u60e0\u5238\u4fe1\u606f\uff1bScrapy\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6846\u67b6\uff0c\u9002\u5408\u5904\u7406\u590d\u6742\u7684\u722c\u866b\u9879\u76ee\u3002\u6839\u636e\u9879\u76ee\u7684\u590d\u6742\u6027\u548c\u9700\u6c42\uff0c\u9009\u62e9\u6700\u9002\u5408\u7684\u5e93\u3002<\/p>\n<p><strong>\u722c\u53d6\u4f18\u60e0\u5238\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u6cd5\u5f8b\u6cd5\u89c4\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u4f18\u60e0\u5238\u722c\u53d6\u65f6\uff0c\u9075\u5faa\u7f51\u7ad9\u7684robots.txt\u6587\u4ef6\u4e2d\u7684\u722c\u53d6\u89c4\u5219\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u540c\u65f6\uff0c\u786e\u4fdd\u4e0d\u4fb5\u72af\u7f51\u7ad9\u7684\u7248\u6743\u548c\u5546\u6807\u6743\u3002\u67d0\u4e9b\u7f51\u7ad9\u53ef\u80fd\u5bf9\u722c\u866b\u884c\u4e3a\u6709\u660e\u786e\u7981\u6b62\uff0c\u8fdb\u884c\u722c\u53d6\u524d\u6700\u597d\u4e86\u89e3\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\uff0c\u4ee5\u907f\u514d\u6cd5\u5f8b\u98ce\u9669\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u722c\u53d6\u5230\u7684\u4f18\u60e0\u5238\u6570\u636e\uff1f<\/strong><br \/>\u722c\u53d6\u5230\u7684\u4f18\u60e0\u5238\u6570\u636e\u901a\u5e38\u9700\u8981\u8fdb\u884c\u6e05\u6d17\u548c\u5b58\u50a8\u3002\u53ef\u4ee5\u4f7f\u7528Pandas\u5e93\u5bf9\u6570\u636e\u8fdb\u884c\u6574\u7406\u548c\u5206\u6790\uff0c\u53bb\u9664\u91cd\u590d\u4fe1\u606f\uff0c\u5e76\u5c06\u5176\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6\u6216\u6570\u636e\u5e93\u3002\u8fd8\u53ef\u4ee5\u8003\u8651\u5c06\u6570\u636e\u53ef\u89c6\u5316\uff0c\u5e2e\u52a9\u66f4\u597d\u5730\u7406\u89e3\u548c\u5229\u7528\u8fd9\u4e9b\u4f18\u60e0\u5238\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u5229\u7528python\u722c\u53d6\u4f18\u60e0\u5238 \u5229\u7528Python\u722c\u53d6\u4f18\u60e0\u5238\u7684\u5173\u952e\u5728\u4e8e\uff1a\u9009\u62e9\u5408\u9002\u7684\u7f51\u7ad9\u3001\u5206\u6790\u7f51\u9875\u7ed3\u6784\u3001\u4f7f\u7528\u8bf7\u6c42\u5e93 [&hellip;]","protected":false},"author":3,"featured_media":1025341,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1025333"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1025333"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1025333\/revisions"}],"predecessor-version":[{"id":1025343,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1025333\/revisions\/1025343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1025341"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1025333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1025333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1025333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}