{"id":976703,"date":"2024-12-27T06:23:43","date_gmt":"2024-12-26T22:23:43","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/976703.html"},"modified":"2024-12-27T06:23:46","modified_gmt":"2024-12-26T22:23:46","slug":"python%e5%a6%82%e4%bd%95%e8%ae%be%e7%bd%ae%e8%b6%85%e6%97%b6%e6%8a%9b%e5%87%ba","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/976703.html","title":{"rendered":"python\u5982\u4f55\u8bbe\u7f6e\u8d85\u65f6\u629b\u51fa"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24202305\/dd9ec741-6196-4ef7-aef5-8279b0085bb7.webp\" alt=\"python\u5982\u4f55\u8bbe\u7f6e\u8d85\u65f6\u629b\u51fa\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u8bbe\u7f6e\u8d85\u65f6\u5e76\u629b\u51fa\u5f02\u5e38\u53ef\u4ee5\u4f7f\u7528\u4fe1\u53f7\u6a21\u5757\u3001\u7ebf\u7a0b\u3001\u8bf7\u6c42\u5e93\u7b49\u65b9\u6cd5\u3002\u5176\u4e2d\uff0c\u4f7f\u7528\u8bf7\u6c42\u5e93\u4e2d\u7684timeout\u53c2\u6570\u662f\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u4e4b\u4e00\uff0c\u800c\u4f7f\u7528\u4fe1\u53f7\u6a21\u5757\u5219\u9002\u7528\u4e8eUnix\u7cfb\u7edf\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5176\u4e2d\u4e00\u79cd\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u5728\u8fdb\u884c\u7f51\u7edc\u8bf7\u6c42\u6216\u67d0\u4e9b\u53ef\u80fd\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u64cd\u4f5c\u65f6\u4f7f\u7528<code>requests<\/code>\u5e93\u7684<code>timeout<\/code>\u53c2\u6570\u3002<code>timeout<\/code>\u53c2\u6570\u53ef\u4ee5\u6307\u5b9a\u4e00\u4e2a\u7b49\u5f85\u65f6\u95f4\uff0c\u5982\u679c\u8d85\u8fc7\u4e86\u8fd9\u4e2a\u65f6\u95f4\u800c\u6ca1\u6709\u5f97\u5230\u54cd\u5e94\uff0c\u7a0b\u5e8f\u5c31\u4f1a\u629b\u51fa\u4e00\u4e2a<code>requests.exceptions.Timeout<\/code>\u5f02\u5e38\u3002\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528Requests\u5e93\u7684Timeout\u53c2\u6570<\/h3>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u7f51\u7edc\u8bf7\u6c42\u65f6\uff0c\u5e38\u5e38\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u8d85\u65f6\u65f6\u95f4\uff0c\u4ee5\u907f\u514d\u7531\u4e8e\u7f51\u7edc\u95ee\u9898\u800c\u5bfc\u81f4\u7a0b\u5e8f\u957f\u65f6\u95f4\u963b\u585e\u3002Python\u7684<code>requests<\/code>\u5e93\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u65b9\u6cd5\u6765\u8bbe\u7f6e\u8bf7\u6c42\u7684\u8d85\u65f6\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h4>1. Requests\u5e93\u7b80\u4ecb<\/h4>\n<\/p>\n<p><p><code>requests<\/code>\u5e93\u662fPython\u4e2d\u7528\u4e8e\u53d1\u9001HTTP\u8bf7\u6c42\u7684\u7b2c\u4e09\u65b9\u5e93\u3002\u5b83\u7b80\u5316\u4e86HTTP\u8bf7\u6c42\u7684\u53d1\u9001\u548c\u54cd\u5e94\u7684\u5904\u7406\uff0c\u662f\u7f51\u7edc\u722c\u866b\u548cAPI\u8c03\u7528\u4e2d\u5e38\u7528\u7684\u5de5\u5177\u3002\u8981\u4f7f\u7528\u5b83\uff0c\u9700\u8981\u5148\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528timeout\u53c2\u6570<\/h4>\n<\/p>\n<p><p>\u5728<code>requests.get()<\/code>\u3001<code>requests.post()<\/code>\u7b49\u65b9\u6cd5\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7<code>timeout<\/code>\u53c2\u6570\u6765\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\u3002<code>timeout<\/code>\u53ef\u4ee5\u662f\u4e00\u4e2a\u6570\u5b57\uff0c\u8868\u793a\u79d2\u6570\uff1b\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2a\u5143\u7ec4\uff0c\u5206\u522b\u6307\u5b9a\u8fde\u63a5\u548c\u8bfb\u53d6\u7684\u8d85\u65f6\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>try:<\/p>\n<p>    response = requests.get(&#39;https:\/\/example.com&#39;, timeout=5)<\/p>\n<p>    response.r<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>se_for_status()  # \u5982\u679c\u54cd\u5e94\u72b6\u6001\u7801\u4e0d\u662f200\uff0c\u629b\u51fa\u5f02\u5e38<\/p>\n<p>except requests.exceptions.Timeout:<\/p>\n<p>    print(&quot;\u8bf7\u6c42\u8d85\u65f6\uff01&quot;)<\/p>\n<p>except requests.exceptions.RequestException as e:<\/p>\n<p>    print(f&quot;\u8bf7\u6c42\u5931\u8d25\uff1a{e}&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;\u8bf7\u6c42\u6210\u529f\uff0c\u54cd\u5e94\u5185\u5bb9\u4e3a\uff1a&quot;, response.content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u5982\u679c<code>requests.get()<\/code>\u57285\u79d2\u5185\u6ca1\u6709\u6536\u5230\u54cd\u5e94\uff0c\u5219\u4f1a\u629b\u51fa<code>requests.exceptions.Timeout<\/code>\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u4fe1\u53f7\u6a21\u5757\uff08\u4ec5\u9002\u7528\u4e8eUnix\u7cfb\u7edf\uff09<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u53ef\u80fd\u4f1a\u8fd0\u884c\u5f88\u957f\u65f6\u95f4\u7684\u51fd\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684<code>signal<\/code>\u6a21\u5757\u6765\u8bbe\u7f6e\u8d85\u65f6\u3002<\/p>\n<\/p>\n<p><h4>1. Signal\u6a21\u5757\u7b80\u4ecb<\/h4>\n<\/p>\n<p><p><code>signal<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u8bbe\u7f6e\u548c\u5904\u7406Unix\u4fe1\u53f7\u7684\u529f\u80fd\u3002\u5b83\u53ef\u4ee5\u7528\u6765\u8bbe\u7f6e\u4e00\u4e2a\u5b9a\u65f6\u5668\uff0c\u5f53\u5b9a\u65f6\u5668\u5230\u671f\u65f6\uff0c\u4f1a\u89e6\u53d1\u4e00\u4e2a\u4fe1\u53f7\u3002<\/p>\n<\/p>\n<p><h4>2. \u4f7f\u7528\u4fe1\u53f7\u8bbe\u7f6e\u8d85\u65f6<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>signal.alarm()<\/code>\u65b9\u6cd5\u6765\u8bbe\u7f6e\u4e00\u4e2a\u8d85\u65f6\u65f6\u95f4\uff0c\u5e76\u5728\u8d85\u65f6\u540e\u629b\u51fa\u4e00\u4e2a\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import signal<\/p>\n<p>class TimeoutException(Exception):<\/p>\n<p>    pass<\/p>\n<p>def handler(signum, frame):<\/p>\n<p>    raise TimeoutException(&quot;\u51fd\u6570\u6267\u884c\u8d85\u65f6\uff01&quot;)<\/p>\n<p>signal.signal(signal.SIGALRM, handler)<\/p>\n<p>def long_running_function():<\/p>\n<p>    # \u6a21\u62df\u4e00\u4e2a\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u51fd\u6570<\/p>\n<p>    import time<\/p>\n<p>    time.sleep(10)<\/p>\n<p>try:<\/p>\n<p>    signal.alarm(5)  # \u8bbe\u7f6e\u8d85\u65f6\u4e3a5\u79d2<\/p>\n<p>    long_running_function()<\/p>\n<p>except TimeoutException as e:<\/p>\n<p>    print(e)<\/p>\n<p>finally:<\/p>\n<p>    signal.alarm(0)  # \u53d6\u6d88\u5b9a\u65f6\u5668<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u5982\u679c<code>long_running_function<\/code>\u57285\u79d2\u5185\u6ca1\u6709\u5b8c\u6210\u6267\u884c\uff0c\u5219\u4f1a\u629b\u51fa<code>TimeoutException<\/code>\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u591a\u7ebf\u7a0b\u6216\u591a\u8fdb\u7a0b<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528\u591a\u7ebf\u7a0b\u6216\u591a\u8fdb\u7a0b\u6765\u5904\u7406\u8d85\u65f6\u95ee\u9898\u4e5f\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u901a\u8fc7\u5728\u5355\u72ec\u7684\u7ebf\u7a0b\u6216\u8fdb\u7a0b\u4e2d\u8fd0\u884c\u53ef\u8d85\u65f6\u7684\u64cd\u4f5c\uff0c\u53ef\u4ee5\u66f4\u7075\u6d3b\u5730\u63a7\u5236\u8d85\u65f6\u884c\u4e3a\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528Threading\u6a21\u5757<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import threading<\/p>\n<p>def long_running_function():<\/p>\n<p>    import time<\/p>\n<p>    time.sleep(10)<\/p>\n<p>    print(&quot;\u5b8c\u6210&quot;)<\/p>\n<p>thread = threading.Thread(target=long_running_function)<\/p>\n<p>thread.start()<\/p>\n<p>thread.join(timeout=5)<\/p>\n<p>if thread.is_alive():<\/p>\n<p>    print(&quot;\u7ebf\u7a0b\u8d85\u65f6\uff01&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;\u7ebf\u7a0b\u6b63\u5e38\u5b8c\u6210&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528Multiprocessing\u6a21\u5757<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import multiprocessing<\/p>\n<p>def long_running_function():<\/p>\n<p>    import time<\/p>\n<p>    time.sleep(10)<\/p>\n<p>    print(&quot;\u5b8c\u6210&quot;)<\/p>\n<p>process = multiprocessing.Process(target=long_running_function)<\/p>\n<p>process.start()<\/p>\n<p>process.join(timeout=5)<\/p>\n<p>if process.is_alive():<\/p>\n<p>    process.terminate()<\/p>\n<p>    print(&quot;\u8fdb\u7a0b\u8d85\u65f6\uff01&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;\u8fdb\u7a0b\u6b63\u5e38\u5b8c\u6210&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3\u4e0e\u5efa\u8bae<\/h3>\n<\/p>\n<p><p><strong>\u603b\u7ed3<\/strong>\uff1a\u5728Python\u4e2d\u8bbe\u7f6e\u8d85\u65f6\u5e76\u629b\u51fa\u5f02\u5e38\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u5176\u4e2d<code>requests<\/code>\u5e93\u7684<code>timeout<\/code>\u53c2\u6570\u662f\u6700\u7b80\u5355\u548c\u5e38\u7528\u7684\u65b9\u6cd5\uff1b\u5bf9\u4e8e\u51fd\u6570\u6267\u884c\u65f6\u95f4\u7684\u63a7\u5236\uff0c\u53ef\u4ee5\u4f7f\u7528<code>signal<\/code>\u6a21\u5757\uff08\u4ec5\u9650Unix\u7cfb\u7edf\uff09\u6216\u591a\u7ebf\u7a0b\u3001\u591a\u8fdb\u7a0b\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p><strong>\u5efa\u8bae<\/strong>\uff1a\u5728\u9009\u62e9\u8d85\u65f6\u63a7\u5236\u65b9\u6cd5\u65f6\uff0c\u5e94\u6839\u636e\u5177\u4f53\u5e94\u7528\u573a\u666f\u548c\u5e73\u53f0\u8fdb\u884c\u9009\u62e9\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u7f51\u7edc\u8bf7\u6c42\uff0c\u76f4\u63a5\u4f7f\u7528<code>requests<\/code>\u5e93\u7684<code>timeout<\/code>\u53c2\u6570\uff1b\u5bf9\u4e8e\u9700\u8981\u63a7\u5236\u6267\u884c\u65f6\u95f4\u7684\u51fd\u6570\uff0c\u4f18\u5148\u8003\u8651\u4f7f\u7528\u591a\u7ebf\u7a0b\u6216\u591a\u8fdb\u7a0b\u6765\u5b9e\u73b0\u8de8\u5e73\u53f0\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u5408\u7406\u5730\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\uff0c\u53ef\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u548c\u7528\u6237\u4f53\u9a8c\uff0c\u907f\u514d\u56e0\u5916\u90e8\u73af\u5883\u56e0\u7d20\u5bfc\u81f4\u7a0b\u5e8f\u957f\u65f6\u95f4\u963b\u585e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8bbe\u7f6e\u8bf7\u6c42\u8d85\u65f6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>requests<\/code>\u5e93\u6765\u53d1\u9001HTTP\u8bf7\u6c42\u5e76\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4\u3002\u901a\u8fc7\u5728<code>requests.get()<\/code>\u6216<code>requests.post()<\/code>\u7b49\u8bf7\u6c42\u65b9\u6cd5\u4e2d\u6dfb\u52a0<code>timeout<\/code>\u53c2\u6570\uff0c\u53ef\u4ee5\u6307\u5b9a\u8bf7\u6c42\u8d85\u65f6\u65f6\u95f4\uff08\u5355\u4f4d\u4e3a\u79d2\uff09\u3002\u4f8b\u5982\uff0c<code>requests.get(&#39;http:\/\/example.com&#39;, timeout=5)<\/code>\u5c06\u4f1a\u57285\u79d2\u540e\u629b\u51fa\u8d85\u65f6\u5f02\u5e38\u3002<\/p>\n<p><strong>\u5982\u679c\u8bf7\u6c42\u8d85\u65f6\uff0c\u6211\u8be5\u5982\u4f55\u5904\u7406\u5f02\u5e38\uff1f<\/strong><br \/>\u5f53\u8bf7\u6c42\u8d85\u65f6\u53d1\u751f\u65f6\uff0c<code>requests<\/code>\u5e93\u4f1a\u629b\u51fa<code>requests.exceptions.Timeout<\/code>\u5f02\u5e38\u3002\u53ef\u4ee5\u4f7f\u7528<code>try...except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u8fd9\u4e2a\u5f02\u5e38\uff0c\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u5904\u7406\uff0c\u6bd4\u5982\u91cd\u8bd5\u8bf7\u6c42\u3001\u8bb0\u5f55\u65e5\u5fd7\u6216\u901a\u77e5\u7528\u6237\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import requests\n\ntry:\n    response = requests.get(&#39;http:\/\/example.com&#39;, timeout=5)\nexcept requests.exceptions.Timeout:\n    print(&quot;\u8bf7\u6c42\u8d85\u65f6\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\u3002&quot;)\n<\/code><\/pre>\n<p><strong>Python\u4e2d\u8fd8\u6709\u54ea\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u8bbe\u7f6e\u8d85\u65f6\uff1f<\/strong><br \/>\u9664\u4e86\u4f7f\u7528<code>requests<\/code>\u5e93\u5916\uff0cPython\u7684<code>socket<\/code>\u5e93\u4e5f\u63d0\u4f9b\u4e86\u8bbe\u7f6e\u8d85\u65f6\u7684\u529f\u80fd\u3002\u901a\u8fc7\u8bbe\u7f6e<code>socket.setdefaulttimeout(seconds)<\/code>\u53ef\u4ee5\u4e3a\u6240\u6709\u7684socket\u8fde\u63a5\u8bbe\u5b9a\u9ed8\u8ba4\u8d85\u65f6\u3002\u4e5f\u53ef\u4ee5\u5bf9\u5177\u4f53\u7684socket\u5b9e\u4f8b\u4f7f\u7528<code>socket.settimeout(seconds)<\/code>\u65b9\u6cd5\u6765\u8bbe\u7f6e\u8d85\u65f6\u3002\u8fd9\u6837\u505a\u53ef\u4ee5\u9002\u7528\u4e8e\u66f4\u4f4e\u5c42\u6b21\u7684\u7f51\u7edc\u7f16\u7a0b\u3002<\/p>\n<p><strong>\u5728\u4f7f\u7528asyncio\u8fdb\u884c\u5f02\u6b65\u8bf7\u6c42\u65f6\uff0c\u5982\u4f55\u8bbe\u7f6e\u8d85\u65f6\uff1f<\/strong><br \/>\u4f7f\u7528<code>asyncio<\/code>\u5e93\u8fdb\u884c\u5f02\u6b65\u7f16\u7a0b\u65f6\uff0c\u53ef\u4ee5\u5229\u7528<code>asyncio.wait_for()<\/code>\u65b9\u6cd5\u4e3a\u5f02\u6b65\u4efb\u52a1\u8bbe\u7f6e\u8d85\u65f6\u3002\u8be5\u65b9\u6cd5\u53ef\u4ee5\u5c06\u4e00\u4e2a\u534f\u7a0b\u5305\u88f9\u8d77\u6765\uff0c\u5e76\u5728\u6307\u5b9a\u7684\u65f6\u95f4\u5185\u7b49\u5f85\u5176\u5b8c\u6210\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import asyncio\nimport aiohttp\n\nasync def fetch(url):\n    async with aiohttp.ClientSession() as session:\n        async with session.get(url) as response:\n            return await response.text()\n\nasync def main():\n    try:\n        result = await asyncio.wait_for(fetch(&#39;http:\/\/example.com&#39;), timeout=5)\n    except asyncio.TimeoutError:\n        print(&quot;\u8bf7\u6c42\u8d85\u65f6\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\u3002&quot;)\n\nasyncio.run(main())\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u8bbe\u7f6e\u8d85\u65f6\u5e76\u629b\u51fa\u5f02\u5e38\u53ef\u4ee5\u4f7f\u7528\u4fe1\u53f7\u6a21\u5757\u3001\u7ebf\u7a0b\u3001\u8bf7\u6c42\u5e93\u7b49\u65b9\u6cd5\u3002\u5176\u4e2d\uff0c\u4f7f\u7528\u8bf7\u6c42\u5e93\u4e2d\u7684timeout\u53c2\u6570 [&hellip;]","protected":false},"author":3,"featured_media":976718,"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\/976703"}],"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=976703"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/976703\/revisions"}],"predecessor-version":[{"id":976723,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/976703\/revisions\/976723"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/976718"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=976703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=976703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=976703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}