{"id":226219,"date":"2024-05-11T20:22:08","date_gmt":"2024-05-11T12:22:08","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/226219.html"},"modified":"2024-05-11T20:22:13","modified_gmt":"2024-05-11T12:22:13","slug":"python%e7%88%ac%e8%99%ab%e5%a6%82%e4%bd%95%e5%8c%b9%e9%85%8d%e6%89%80%e6%9c%89%e7%9a%84%e4%b8%8d%e5%90%8c%e6%ad%a3%e5%88%99%e8%a7%84%e5%88%99%e7%9a%84%e5%9b%be%e7%89%87","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/226219.html","title":{"rendered":"Python\u722c\u866b\u5982\u4f55\u5339\u914d\u6240\u6709\u7684\u4e0d\u540c\u6b63\u5219\u89c4\u5219\u7684\u56fe\u7247"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25145618\/7181e84f-46f0-4dc0-b9ef-452ad501a447.webp\" alt=\"Python\u722c\u866b\u5982\u4f55\u5339\u914d\u6240\u6709\u7684\u4e0d\u540c\u6b63\u5219\u89c4\u5219\u7684\u56fe\u7247\" \/><\/p>\n<p><p>\u4f7f\u7528Python\u722c\u866b\u5339\u914d\u6240\u6709\u4e0d\u540c\u6b63\u5219\u89c4\u5219\u7684\u56fe\u7247\u662f\u4e00\u79cd\u9ad8\u6548\u7b5b\u9009\u7f51\u9875\u56fe\u7247\u8d44\u6e90\u7684\u65b9\u6cd5\u3002<strong>\u901a\u8fc7\u4f7f\u7528Python\u7684\u5f3a\u5927\u5e93\u5982<code>requests<\/code>\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\u3001<code>re<\/code>\u6a21\u5757\u89e3\u6790\u548c\u5339\u914d\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u4ee5\u53ca<code>BeautifulSoup<\/code>\u6216<code>lxml<\/code>\u7b49\u89e3\u6790\u5e93\u63d0\u53d6\u7f51\u9875\u7ed3\u6784\u4e2d\u7684\u56fe\u7247\u94fe\u63a5<\/strong>\uff0c\u53ef\u4ee5\u9ad8\u6548\u5730\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c<strong>\u6784\u5efa\u7075\u6d3b\u4e14\u5168\u9762\u7684\u6b63\u5219\u8868\u8fbe\u5f0f<\/strong>\u662f\u5173\u952e\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u80fd\u51c6\u786e\u5339\u914d\u4e0d\u540c\u683c\u5f0f\u548c\u547d\u540d\u89c4\u5219\u7684\u56fe\u7247\u94fe\u63a5\uff0c\u5982<code>.jpg<\/code>\u3001<code>.png<\/code>\u3001<code>.gif<\/code>\u7b49\uff0c\u751a\u81f3\u80fd\u591f\u5339\u914d\u5177\u6709\u7279\u5b9a\u5c5e\u6027\u7684\u56fe\u7247\uff08\u6bd4\u5982\u56fe\u7247\u5927\u5c0f\u3001\u56fe\u7247\u6240\u5728\u7684\u7f51\u9875\u533a\u57df\u7b49\uff09\u3002\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u9700\u8981\u4ece\u591a\u6837\u5316\u7f51\u9875\u4e2d\u5feb\u901f\u51c6\u786e\u63d0\u53d6\u5927\u91cf\u56fe\u7247\u8d44\u6599\u7684\u573a\u666f\uff0c\u5982\u6570\u636e\u5206\u6790\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u6570\u636e\u96c6\u7684\u6784\u5efa\u7b49\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001PYTHON\u73af\u5883\u51c6\u5907<\/h3>\n<\/p>\n<p><h4>\u5b89\u88c5\u5fc5\u8981\u7684\u5e93<\/h4>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u7f16\u5199\u722c\u866b\u4ee3\u7801\u4e4b\u524d\uff0c\u786e\u4fddPython\u73af\u5883\u4e2d\u5b89\u88c5\u4e86<code>requests<\/code>\u3001<code>re<\/code>\u3001<code>BeautifulSoup<\/code>\u548c<code>lxml<\/code>\u7b49\u5e93\u3002\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u4e86\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\u3001\u89e3\u6790HTML\u3001\u5339\u914d\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u529f\u80fd\uff0c\u5bf9\u4e8e\u56fe\u7247\u722c\u53d6\u6765\u8bf4\u81f3\u5173\u91cd\u8981\u3002\u53ef\u4ee5\u901a\u8fc7Python\u5305\u7ba1\u7406\u5668pip\u6765\u5b89\u88c5\u8fd9\u4e9b\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install requests beautifulsoup4 lxml<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u8bbe\u7f6ePython\u811a\u672c<\/h4>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u5fc5\u8981\u7684\u5e93\u540e\uff0c\u8bbe\u7f6e\u4e00\u4e2aPython\u811a\u672c\uff0c\u5bfc\u5165\u8fd9\u4e9b\u5e93\uff0c\u5e76\u5b9a\u4e49\u4e00\u4e9b\u57fa\u672c\u7684\u722c\u866b\u914d\u7f6e\uff0c\u5982\u8bf7\u6c42\u5934\uff08User-Agent\uff09\uff0c\u8fd9\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\uff0c\u907f\u514d\u88ab\u4e00\u4e9b\u7f51\u7ad9\u7684\u53cd\u722c\u866b\u7b56\u7565\u963b\u6321\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u6784\u5efa\u6b63\u5219\u8868\u8fbe\u5f0f<\/h3>\n<\/p>\n<p><h4>\u7406\u89e3\u6b63\u5219\u8868\u8fbe\u5f0f\u57fa\u7840<\/h4>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u5339\u914d\u5b57\u7b26\u4e32\u7684\u5f3a\u5927\u5de5\u5177\uff0c\u901a\u8fc7\u5b9a\u4e49\u4e00\u7cfb\u5217\u7684\u89c4\u5219\uff0c\u53ef\u4ee5\u5339\u914d\u5177\u6709\u76f8\u4f3c\u7ed3\u6784\u7684\u5b57\u7b26\u4e32\u3002\u5b66\u4f1a\u6784\u5efa\u9002\u5e94\u6027\u5f3a\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u5bf9\u4e8e\u5339\u914d\u5404\u79cd\u56fe\u7247\u683c\u5f0f\u975e\u5e38\u91cd\u8981\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u7b80\u5355\u7684\u5339\u914d\u5927\u90e8\u5206\u56fe\u7247\u94fe\u63a5\u7684\u6b63\u5219\u53ef\u4ee5\u662f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">img_pattern = r&#039;https?:\/\/[\\w.\/-]+\\.(jpg|jpeg|png|gif)&#039;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u8868\u8fbe\u5f0f\u5339\u914d\u4ee5http\u6216https\u5f00\u5934\uff0c\u540e\u9762\u8ddf\u4efb\u610f\u591a\u4e2a\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u70b9\u3001\u659c\u6760\u6216\u77ed\u6a2a\u7ebf\uff0c\u6700\u540e\u4ee5jpg\u3001jpeg\u3001png\u6216gif\u7ed3\u5c3e\u7684URL\u3002<\/p>\n<\/p>\n<p><h4>\u9ad8\u7ea7\u6b63\u5219\u8868\u8fbe\u5f0f\u6280\u5de7<\/h4>\n<\/p>\n<p><p>\u4e3a\u4e86\u5339\u914d\u66f4\u591a\u6837\u5316\u7684\u56fe\u7247\u94fe\u63a5\uff0c\u8fd8\u9700\u8981\u4f7f\u7528\u66f4\u9ad8\u7ea7\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6280\u5de7\uff0c\u5982\u4f7f\u7528\u62ec\u53f7\u8fdb\u884c\u5206\u7ec4\u3001\u4f7f\u7528<code>?<\/code>\u5b9e\u73b0\u975e\u8d2a\u5a6a\u5339\u914d\u7b49\u3002\u4f8b\u5982\uff0c\u4e3a\u4e86\u5339\u914d\u5177\u6709\u67e5\u8be2\u53c2\u6570\u7684\u56fe\u7247URL\uff0c\u53ef\u4ee5\u4fee\u6539\u4e0a\u8ff0\u6b63\u5219\u8868\u8fbe\u5f0f\u4e3a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">img_pattern = r&#039;https?:\/\/[\\w.\/-]+\\.(jpg|jpeg|png|gif)(\\?\\w+=\\w+)?&#039;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u8868\u8fbe\u5f0f\u8fd8\u53ef\u4ee5\u5339\u914d\u94fe\u63a5\u672b\u5c3e\u5e26\u6709\u67e5\u8be2\u53c2\u6570\u7684\u56fe\u7247URL\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528PYTHON\u5e93\u83b7\u53d6\u548c\u89e3\u6790\u7f51\u9875<\/h3>\n<\/p>\n<p><h4>\u4f7f\u7528requests\u83b7\u53d6\u7f51\u9875\u5185\u5bb9<\/h4>\n<\/p>\n<p><p><code>requests<\/code>\u5e93\u7b80\u5316\u4e86HTTP\u8bf7\u6c42\u7684\u53d1\u9001\u8fc7\u7a0b\u3002\u53ea\u9700\u51e0\u884c\u4ee3\u7801\u5c31\u80fd\u83b7\u53d6\u4efb\u4f55\u7f51\u9875\u7684\u6e90\u4ee3\u7801\uff0c\u4ece\u800c\u4f5c\u4e3a\u6b63\u5219\u8868\u8fbe\u5f0f\u548c\u89e3\u6790\u5e93\u7684\u8f93\u5165\u3002\u4e0b\u9762\u7684\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u83b7\u53d6\u4e00\u4e2a\u7f51\u9875\u7684\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>url = &quot;https:\/\/example.com&quot;<\/p>\n<p>response = requests.get(url, headers={&#039;User-Agent&#039;: &#039;Custom User Agent&#039;})<\/p>\n<p>web_content = response.text<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528BeautifulSoup\u89e3\u6790\u7f51\u9875\u7ed3\u6784<\/h4>\n<\/p>\n<p><p>\u5c3d\u7ba1\u53ef\u4ee5\u76f4\u63a5\u5728\u7f51\u9875\u6e90\u4ee3\u7801\u4e0a\u8fd0\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u56fe\u7247\u94fe\u63a5\u7684\u5339\u914d\uff0c\u4f7f\u7528<code>BeautifulSoup<\/code>\u89e3\u6790\u5e93\u53ef\u4ee5\u66f4\u52a0\u7cbe\u786e\u5730\u63d0\u53d6\u56fe\u7247\u5143\u7d20\u3002<code>BeautifulSoup<\/code>\u53ef\u4ee5\u89e3\u6790HTML\u6216XML\u6587\u6863\uff0c\u5c06\u5176\u8f6c\u6362\u4e3a\u590d\u6742\u7684\u6811\u5f62\u7ed3\u6784\uff0c\u4ece\u800c\u5141\u8bb8\u6211\u4eec\u8fdb\u884c\u9ad8\u6548\u7684\u67e5\u8be2\u548c\u6570\u636e\u63d0\u53d6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bs4 import BeautifulSoup<\/p>\n<p>soup = BeautifulSoup(web_content, &#039;lxml&#039;)<\/p>\n<p>images = soup.find_all(&#039;img&#039;)<\/p>\n<p>for image in images:<\/p>\n<p>    print(image[&#039;src&#039;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u7ed3\u5408\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u56fe\u7247\u94fe\u63a5<\/h3>\n<\/p>\n<p><p>\u5728\u83b7\u53d6\u548c\u89e3\u6790\u7f51\u9875\u540e\uff0c\u7ed3\u5408\u524d\u9762\u6784\u5efa\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u5bf9\u56fe\u7247\u94fe\u63a5\u8fdb\u884c\u5339\u914d\u662f\u4e0b\u4e00\u6b65\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>re<\/code>\u6a21\u5757\u7684<code>findall<\/code>\u65b9\u6cd5\u5728\u7f51\u9875\u5185\u5bb9\u4e2d\u641c\u7d22\u5339\u914d\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u6240\u6709\u5b9e\u4f8b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>matched_images = re.findall(img_pattern, web_content)<\/p>\n<p>for img_url in matched_images:<\/p>\n<p>    print(img_url)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u4e00\u8fc7\u7a0b\uff0c\u5373\u4f7f\u7f51\u9875\u4e2d\u5305\u542b\u4e86\u591a\u79cd\u4e0d\u540c\u547d\u540d\u89c4\u5219\u7684\u56fe\u7247\u94fe\u63a5\uff0c\u4e5f\u80fd\u591f\u6709\u6548\u5730\u88ab\u8bc6\u522b\u548c\u63d0\u53d6\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4e0b\u8f7d\u548c\u4fdd\u5b58\u56fe\u7247<\/h3>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u83b7\u53d6\u5230\u7684\u56fe\u7247\u94fe\u63a5\u53ef\u4ee5\u7528<code>requests<\/code>\u5e93\u4e0b\u8f7d\uff0c\u5e76\u4f7f\u7528Python\u7684\u6587\u4ef6\u64cd\u4f5c\u5199\u5165\u5230\u672c\u5730\u786c\u76d8\u3002\u8fd9\u4e00\u6b65\u9aa4\u5b8c\u6210\u4e86\u6574\u4e2a\u4ece\u5339\u914d\u5230\u4fdd\u5b58\u56fe\u7247\u7684\u5b8c\u6574\u6d41\u7a0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for img_url in matched_images:<\/p>\n<p>    img_data = requests.get(img_url).content<\/p>\n<p>    with open(f&quot;images\/{img_url.split(&#039;\/&#039;)[-1]}&quot;, &#039;wb&#039;) as img_file:<\/p>\n<p>        img_file.write(img_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u904d\u5386\u6240\u6709\u5339\u914d\u5230\u7684\u56fe\u7247\u94fe\u63a5\uff0c\u4f7f\u7528<code>requests.get<\/code>\u65b9\u6cd5\u83b7\u53d6\u56fe\u7247\u5185\u5bb9\uff0c\u7136\u540e\u5c06\u5176\u4fdd\u5b58\u5230\u672c\u5730\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u6211\u4eec\u4f7f\u7528Python\u6784\u5efa\u4e86\u4e00\u4e2a\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u80fd\u591f\u5339\u914d\u5e76\u4e0b\u8f7d\u7f51\u9875\u4e2d\u6240\u6709\u9075\u5faa\u4e0d\u540c\u6b63\u5219\u89c4\u5219\u7684\u56fe\u7247\u3002\u8fd9\u4e0d\u4ec5\u4f53\u73b0\u4e86Python\u53ca\u5176\u5e93\u5728\u7f51\u7edc\u722c\u866b\u9886\u57df\u7684\u5f3a\u5927\u80fd\u529b\uff0c\u540c\u65f6\u4e5f\u5c55\u793a\u4e86\u6b63\u5219\u8868\u8fbe\u5f0f\u5728\u5904\u7406\u548c\u5339\u914d\u5b57\u7b26\u4e32\u65b9\u9762\u7684\u4e0d\u53ef\u66ff\u4ee3\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u5982\u4f55\u4f7f\u7528Python\u722c\u866b\u5339\u914d\u591a\u79cd\u4e0d\u540c\u7684\u6b63\u5219\u89c4\u5219\u6765\u63d0\u53d6\u56fe\u7247\uff1f<\/strong><\/p>\n<p>Python\u722c\u866b\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u4e0d\u540c\u7684\u89c4\u5219\uff0c\u4ee5\u63d0\u53d6\u56fe\u7247\u3002\u9996\u5148\uff0c\u4f60\u9700\u8981\u5bfc\u5165re\u6a21\u5757\uff0c\u7136\u540e\u4f7f\u7528re.findall()\u51fd\u6570\u6765\u5339\u914d\u56fe\u7247\u7684URL\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u591a\u4e2a\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u4e0d\u540c\u7c7b\u578b\u7684\u56fe\u7247\uff0c\u4f8b\u5982\uff1a\u5339\u914d\u4ee5.jpg\u3001.png\u3001.gif\u7ed3\u5c3e\u7684\u56fe\u7247\u94fe\u63a5\u3002<\/p>\n<p><strong>2. Python\u722c\u866b\u5982\u4f55\u5e94\u5bf9\u4e0d\u540c\u7f51\u7ad9\u4e0a\u7684\u56fe\u7247\u94fe\u63a5\u89c4\u5219\u4e0d\u4e00\u81f4\u7684\u60c5\u51b5\uff1f<\/strong><\/p>\n<p>\u4e0d\u540c\u7f51\u7ad9\u4e0a\u7684\u56fe\u7247\u94fe\u63a5\u89c4\u5219\u53ef\u80fd\u4e0d\u4e00\u81f4\uff0c\u8fd9\u5bf9Python\u722c\u866b\u6765\u8bf4\u662f\u4e00\u4e2a\u6311\u6218\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u591a\u4e2a\u6b63\u5219\u8868\u8fbe\u5f0f\u6216\u8005\u91c7\u7528\u5176\u4ed6\u7684\u89e3\u6790\u65b9\u6cd5\u6765\u5339\u914d\u4e0d\u540c\u7f51\u7ad9\u4e0a\u7684\u56fe\u7247\u94fe\u63a5\u3002\u53e6\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7\u89c2\u5bdf\u7f51\u9875\u7684\u6e90\u4ee3\u7801\u6216\u8005\u4f7f\u7528\u5f00\u53d1\u8005\u5de5\u5177\u6765\u627e\u5230\u9875\u9762\u4e0a\u56fe\u7247\u94fe\u63a5\u7684\u5171\u540c\u7279\u70b9\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u7f16\u5199\u5339\u914d\u89c4\u5219\u3002<\/p>\n<p><strong>3. \u6709\u6ca1\u6709\u5176\u4ed6\u7684\u66ff\u4ee3\u65b9\u6cd5\u6765\u5339\u914d\u591a\u79cd\u4e0d\u540c\u89c4\u5219\u7684\u56fe\u7247\uff0c\u800c\u4e0d\u4ec5\u4ec5\u4f9d\u8d56\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\uff1f<\/strong><\/p>\n<p>\u9664\u4e86\u6b63\u5219\u8868\u8fbe\u5f0f\u4e4b\u5916\uff0c\u8fd8\u6709\u5176\u4ed6\u7684\u65b9\u6cd5\u53ef\u4ee5\u5339\u914d\u591a\u79cd\u4e0d\u540c\u89c4\u5219\u7684\u56fe\u7247\u3002\u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528HTML\u89e3\u6790\u5e93\uff08\u4f8b\u5982BeautifulSoup\uff09\u6216\u8005XPath\u6765\u5b9a\u4f4d\u7f51\u9875\u4e2d\u7684\u56fe\u7247\u5143\u7d20\uff0c\u5e76\u63d0\u53d6\u5176\u4e2d\u7684\u56fe\u7247\u94fe\u63a5\u3002\u8fd9\u6837\u505a\u53ef\u4ee5\u907f\u514d\u5728\u7f16\u5199\u6b63\u5219\u8868\u8fbe\u5f0f\u65f6\u53ef\u80fd\u51fa\u73b0\u7684\u590d\u6742\u60c5\u51b5\u3002\u7136\u800c\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u4e5f\u9700\u8981\u5bf9HTML\u7ed3\u6784\u548c\u6807\u7b7e\u6709\u4e00\u5b9a\u7684\u4e86\u89e3\uff0c\u4ee5\u4fbf\u51c6\u786e\u5730\u63d0\u53d6\u56fe\u7247\u94fe\u63a5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u722c\u866b\u5339\u914d\u6240\u6709\u4e0d\u540c\u6b63\u5219\u89c4\u5219\u7684\u56fe\u7247\u662f\u4e00\u79cd\u9ad8\u6548\u7b5b\u9009\u7f51\u9875\u56fe\u7247\u8d44\u6e90\u7684\u65b9\u6cd5\u3002\u901a\u8fc7\u4f7f\u7528Python\u7684\u5f3a\u5927\u5e93\u5982 [&hellip;]","protected":false},"author":3,"featured_media":226228,"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\/226219"}],"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=226219"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/226219\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/226228"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=226219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=226219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=226219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}