{"id":922265,"date":"2024-12-26T14:28:33","date_gmt":"2024-12-26T06:28:33","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/922265.html"},"modified":"2024-12-26T14:28:35","modified_gmt":"2024-12-26T06:28:35","slug":"python%e5%a6%82%e4%bd%95%e6%89%a7%e8%a1%8clinux%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/922265.html","title":{"rendered":"python\u5982\u4f55\u6267\u884clinux\u547d\u4ee4"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24210844\/e0c83b6e-e3ef-4005-930a-e61f623b572a.webp\" alt=\"python\u5982\u4f55\u6267\u884clinux\u547d\u4ee4\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u6267\u884cLinux\u547d\u4ee4\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528<code>os.system()<\/code>\u3001<code>subprocess.run()<\/code>\u3001<code>subprocess.Popen()<\/code>\u7b49\u65b9\u6cd5\u5b9e\u73b0\uff0c\u5176\u4e2d<code>subprocess.run()<\/code>\u662f\u63a8\u8350\u7684\u65b9\u5f0f\uff0c\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7684\u7075\u6d3b\u6027\u548c\u66f4\u597d\u7684\u9519\u8bef\u5904\u7406<\/strong>\u3002<code>subprocess.run()<\/code>\u4e0d\u4ec5\u53ef\u4ee5\u6267\u884c\u547d\u4ee4\uff0c\u8fd8\u80fd\u6355\u83b7\u8f93\u51fa\u3001\u5904\u7406\u9519\u8bef\u548c\u63d0\u4f9b\u8fd4\u56de\u503c\u3002\u63a5\u4e0b\u6765\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u8ba8\u8bba\u5982\u4f55\u9009\u62e9\u9002\u5408\u7684\u65b9\u5f0f\u6765\u6267\u884cLinux\u547d\u4ee4\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001OS.SYSTEM()\u65b9\u6cd5<\/p>\n<\/p>\n<p><p><code>os.system()<\/code>\u662fPython\u4e2d\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u4e4b\u4e00\uff0c\u7528\u4e8e\u6267\u884cLinux\u547d\u4ee4\u3002\u5b83\u901a\u8fc7\u8c03\u7528\u5e95\u5c42\u7684\u7cfb\u7edfshell\u6765\u6267\u884c\u547d\u4ee4\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u4f18\u70b9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u7b80\u5355\u6613\u7528<\/strong>\uff1a\u53ea\u9700\u4e00\u884c\u4ee3\u7801\u5373\u53ef\u6267\u884c\u547d\u4ee4\u3002<\/li>\n<li><strong>\u5feb\u901f\u5b9e\u73b0<\/strong>\uff1a\u9002\u5408\u4e8e\u5feb\u901f\u6d4b\u8bd5\u548c\u7b80\u5355\u4efb\u52a1\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u7f3a\u70b9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u65e0\u6cd5\u6355\u83b7\u8f93\u51fa<\/strong>\uff1a\u65e0\u6cd5\u76f4\u63a5\u83b7\u53d6\u547d\u4ee4\u7684\u8f93\u51fa\u7ed3\u679c\u3002<\/li>\n<li><strong>\u5b89\u5168\u6027\u95ee\u9898<\/strong>\uff1a\u5bb9\u6613\u53d7\u5230shell\u6ce8\u5165\u653b\u51fb\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p><code>os.system()<\/code>\u7684\u57fa\u672c\u7528\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>exit_code = os.system(&quot;ls -l&quot;)<\/p>\n<p>print(f&quot;The command exited with code: {exit_code}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>os.system()<\/code>\u6267\u884c\u4e86<code>ls -l<\/code>\u547d\u4ee4\uff0c\u5e76\u8fd4\u56de\u4e86\u547d\u4ee4\u7684\u9000\u51fa\u7801\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5c3d\u7ba1\u8fd9\u4e2a\u65b9\u6cd5\u7b80\u5355\uff0c\u4f46\u7531\u4e8e\u65e0\u6cd5\u6355\u83b7\u8f93\u51fa\uff0c\u901a\u5e38\u4e0d\u5efa\u8bae\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001SUBPROCESS.RUN()\u65b9\u6cd5<\/p>\n<\/p>\n<p><p><code>subprocess.run()<\/code>\u662fPython 3.5\u5f15\u5165\u7684\u4e00\u4e2a\u9ad8\u7ea7\u51fd\u6570\uff0c\u7528\u4e8e\u6267\u884c\u5916\u90e8\u547d\u4ee4\u3002\u5b83\u63d0\u4f9b\u4e86\u66f4\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u6355\u83b7\u8f93\u51fa\u3001\u5904\u7406\u9519\u8bef\u5e76\u8fd4\u56de<code>CompletedProcess<\/code>\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u4f18\u70b9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u7075\u6d3b\u6027\u9ad8<\/strong>\uff1a\u53ef\u4ee5\u6355\u83b7\u8f93\u51fa\u3001\u5904\u7406\u9519\u8bef\u3001\u8bbe\u7f6e\u8d85\u65f6\u7b49\u3002<\/li>\n<li><strong>\u5b89\u5168\u6027\u66f4\u597d<\/strong>\uff1a\u53ef\u4ee5\u907f\u514dshell\u6ce8\u5165\u653b\u51fb\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u7f3a\u70b9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u76f8\u5bf9\u590d\u6742<\/strong>\uff1a\u9700\u8981\u66f4\u591a\u7684\u914d\u7f6e\u548c\u53c2\u6570\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p><code>subprocess.run()<\/code>\u7684\u57fa\u672c\u7528\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<p>result = subprocess.run([&quot;ls&quot;, &quot;-l&quot;], capture_output=True, text=True)<\/p>\n<p>print(&quot;Standard Output:&quot;, result.stdout)<\/p>\n<p>print(&quot;Standard Error:&quot;, result.stderr)<\/p>\n<p>print(&quot;Return Code:&quot;, result.returncode)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>subprocess.run()<\/code>\u6267\u884c\u4e86<code>ls -l<\/code>\u547d\u4ee4\uff0c\u5e76\u6355\u83b7\u4e86\u6807\u51c6\u8f93\u51fa\u548c\u6807\u51c6\u9519\u8bef\u3002\u901a\u8fc7\u8bbe\u7f6e<code>capture_output=True<\/code>\u548c<code>text=True<\/code>\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u4ee5\u5b57\u7b26\u4e32\u5f62\u5f0f\u83b7\u53d6\u8f93\u51fa\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001SUBPROCESS.POPEN()\u65b9\u6cd5<\/p>\n<\/p>\n<p><p><code>subprocess.Popen()<\/code>\u63d0\u4f9b\u4e86\u66f4\u5e95\u5c42\u7684\u63a5\u53e3\u6765\u542f\u52a8\u548c\u7ba1\u7406\u5b50\u8fdb\u7a0b\u3002\u5b83\u6bd4<code>subprocess.run()<\/code>\u66f4\u590d\u6742\uff0c\u4f46\u4e5f\u63d0\u4f9b\u4e86\u66f4\u591a\u7684\u63a7\u5236\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u4f18\u70b9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u66f4\u591a\u63a7\u5236<\/strong>\uff1a\u53ef\u4ee5\u5b9e\u65f6\u5904\u7406\u8f93\u51fa\u3001\u8f93\u5165\u6570\u636e\u6d41\u3002<\/li>\n<li><strong>\u9002\u5408\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u8fdb\u7a0b<\/strong>\uff1a\u53ef\u4ee5\u9010\u884c\u8bfb\u53d6\u8f93\u51fa\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u7f3a\u70b9\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u5b9e\u73b0\u590d\u6742<\/strong>\uff1a\u9700\u8981\u5904\u7406\u8f93\u5165\u8f93\u51fa\u6d41\uff0c\u4ee3\u7801\u8f83\u591a\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p><code>subprocess.Popen()<\/code>\u7684\u57fa\u672c\u7528\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<p>process = subprocess.Popen([&quot;ls&quot;, &quot;-l&quot;], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)<\/p>\n<p>stdout, stderr = process.communicate()<\/p>\n<p>print(&quot;Standard Output:&quot;, stdout)<\/p>\n<p>print(&quot;Standard Error:&quot;, stderr)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>subprocess.Popen()<\/code>\u521b\u5efa\u4e86\u4e00\u4e2a\u5b50\u8fdb\u7a0b\u6765\u6267\u884c<code>ls -l<\/code>\u547d\u4ee4\uff0c\u5e76\u4f7f\u7528<code>communicate()<\/code>\u65b9\u6cd5\u83b7\u53d6\u6807\u51c6\u8f93\u51fa\u548c\u6807\u51c6\u9519\u8bef\u3002\u8fd9\u4e2a\u65b9\u6cd5\u9002\u5408\u9700\u8981\u5b9e\u65f6\u5904\u7406\u8f93\u51fa\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u9700\u6c42\u548c\u573a\u666f\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u7b80\u5355\u4efb\u52a1<\/strong>\uff1a\u5982\u679c\u53ea\u9700\u8981\u6267\u884c\u7b80\u5355\u547d\u4ee4\u4e14\u4e0d\u5173\u5fc3\u8f93\u51fa\uff0c<code>os.system()<\/code>\u662f\u6700\u5feb\u6377\u7684\u9009\u62e9\u3002<\/li>\n<li><strong>\u9700\u8981\u6355\u83b7\u8f93\u51fa\u548c\u9519\u8bef\u5904\u7406<\/strong>\uff1a<code>subprocess.run()<\/code>\u662f\u6700\u4f73\u9009\u62e9\uff0c\u56e0\u4e3a\u5b83\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7684\u7075\u6d3b\u6027\u548c\u5b89\u5168\u6027\u3002<\/li>\n<li><strong>\u9700\u8981\u5b9e\u65f6\u5904\u7406\u8f93\u51fa\u6216\u957f\u65f6\u95f4\u8fd0\u884c<\/strong>\uff1a<code>subprocess.Popen()<\/code>\u63d0\u4f9b\u4e86\u6700\u7ec6\u7c92\u5ea6\u7684\u63a7\u5236\uff0c\u9002\u5408\u590d\u6742\u4efb\u52a1\u3002<\/li>\n<\/ul>\n<p><p>\u4e94\u3001\u5904\u7406\u547d\u4ee4\u9519\u8bef<\/p>\n<\/p>\n<p><p>\u5728\u6267\u884cLinux\u547d\u4ee4\u65f6\uff0c\u5904\u7406\u9519\u8bef\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<code>subprocess.run()<\/code>\u548c<code>subprocess.Popen()<\/code>\u90fd\u63d0\u4f9b\u4e86\u5904\u7406\u9519\u8bef\u7684\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>subprocess.run()<\/strong>\u4e2d\u5904\u7406\u9519\u8bef\uff1a<\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e<code>check=True<\/code>\u6765\u81ea\u52a8\u629b\u51fa\u5f02\u5e38\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<p>try:<\/p>\n<p>    result = subprocess.run([&quot;ls&quot;, &quot;-l&quot;, &quot;\/nonexistent&quot;], check=True, capture_output=True, text=True)<\/p>\n<p>except subprocess.CalledProcessError as e:<\/p>\n<p>    print(&quot;An error occurred:&quot;, e)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>subprocess.Popen()<\/strong>\u4e2d\u5904\u7406\u9519\u8bef\uff1a<\/li>\n<\/ol>\n<p><p>\u9700\u8981\u624b\u52a8\u68c0\u67e5\u8fd4\u56de\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<p>process = subprocess.Popen([&quot;ls&quot;, &quot;-l&quot;, &quot;\/nonexistent&quot;], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)<\/p>\n<p>stdout, stderr = process.communicate()<\/p>\n<p>if process.returncode != 0:<\/p>\n<p>    print(&quot;An error occurred:&quot;, stderr)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u603b\u7ed3\uff1a<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u6267\u884cLinux\u547d\u4ee4\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4f9b\u9009\u62e9\uff0c<code>os.system()<\/code>\u9002\u5408\u7b80\u5355\u4efb\u52a1\uff0c\u800c<code>subprocess.run()<\/code>\u548c<code>subprocess.Popen()<\/code>\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7684\u7075\u6d3b\u6027\u548c\u5b89\u5168\u6027\u3002\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u6765\u51b3\u5b9a\uff0c\u540c\u65f6\u5728\u6267\u884c\u547d\u4ee4\u65f6\u9700\u8981\u6ce8\u610f\u5904\u7406\u9519\u8bef\uff0c\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u7684\u9c81\u68d2\u6027\u548c\u5b89\u5168\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8fd0\u884cLinux\u547d\u4ee4\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>subprocess<\/code>\u6a21\u5757\u6765\u6267\u884cLinux\u547d\u4ee4\u3002\u901a\u8fc7<code>subprocess.run()<\/code>\u6216<code>subprocess.Popen()<\/code>\u7b49\u51fd\u6570\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u8fd0\u884c\u547d\u4ee4\u5e76\u83b7\u53d6\u8f93\u51fa\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u6765\u6267\u884c\u4e00\u4e2a\u7b80\u5355\u7684ls\u547d\u4ee4\u5e76\u83b7\u53d6\u7ed3\u679c\uff1a<\/p>\n<pre><code class=\"language-python\">import subprocess\n\nresult = subprocess.run([&#39;ls&#39;, &#39;-l&#39;], capture_output=True, text=True)\nprint(result.stdout)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u80fd\u591f\u6709\u6548\u5730\u6355\u83b7\u547d\u4ee4\u7684\u6807\u51c6\u8f93\u51fa\u548c\u9519\u8bef\u4fe1\u606f\uff0c\u9002\u7528\u4e8e\u5404\u79cd\u590d\u6742\u7684\u547d\u4ee4\u6267\u884c\u573a\u666f\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u6267\u884c\u547d\u4ee4\u65f6\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u6267\u884cLinux\u547d\u4ee4\u65f6\uff0c\u5904\u7406\u9519\u8bef\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5<code>subprocess.run()<\/code>\u7684\u8fd4\u56de\u7801\u6765\u5224\u65ad\u547d\u4ee4\u662f\u5426\u6210\u529f\u6267\u884c\u3002\u8fd4\u56de\u7801\u4e3a\u96f6\u8868\u793a\u6210\u529f\uff0c\u975e\u96f6\u5219\u8868\u793a\u51fa\u73b0\u9519\u8bef\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<pre><code class=\"language-python\">import subprocess\n\nresult = subprocess.run([&#39;ls&#39;, &#39;non_existing_file&#39;], capture_output=True, text=True)\nif result.returncode != 0:\n    print(f&quot;Error: {result.stderr}&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5e2e\u52a9\u4f60\u6355\u6349\u5230\u6267\u884c\u547d\u4ee4\u65f6\u7684\u9519\u8bef\u4fe1\u606f\uff0c\u4ee5\u4fbf\u8fdb\u884c\u76f8\u5e94\u7684\u5904\u7406\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u6267\u884c\u5e26\u6709\u53c2\u6570\u7684Linux\u547d\u4ee4\uff1f<\/strong><br \/>\u6267\u884c\u5e26\u6709\u53c2\u6570\u7684Linux\u547d\u4ee4\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u5c06\u53c2\u6570\u4f5c\u4e3a\u5217\u8868\u4e2d\u7684\u5143\u7d20\u4f20\u9012\u7ed9<code>subprocess.run()<\/code>\u6216<code>subprocess.Popen()<\/code>\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u60f3\u6267\u884c<code>grep<\/code>\u547d\u4ee4\u6765\u641c\u7d22\u7279\u5b9a\u5185\u5bb9\uff0c\u53ef\u4ee5\u8fd9\u6837\u5199\uff1a<\/p>\n<pre><code class=\"language-python\">import subprocess\n\nsearch_term = &#39;example&#39;\nresult = subprocess.run([&#39;grep&#39;, search_term, &#39;file.txt&#39;], capture_output=True, text=True)\nprint(result.stdout)\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u6784\u9020\u548c\u6267\u884c\u5404\u79cd\u547d\u4ee4\uff0c\u540c\u65f6\u8fd8\u80fd\u52a8\u6001\u5730\u8c03\u6574\u53c2\u6570\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u6267\u884cLinux\u547d\u4ee4\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528os.system()\u3001subprocess.run()\u3001sub [&hellip;]","protected":false},"author":3,"featured_media":922269,"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\/922265"}],"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=922265"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/922265\/revisions"}],"predecessor-version":[{"id":922271,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/922265\/revisions\/922271"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/922269"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=922265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=922265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=922265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}