{"id":175489,"date":"2024-05-08T18:52:21","date_gmt":"2024-05-08T10:52:21","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/175489.html"},"modified":"2024-05-08T18:52:26","modified_gmt":"2024-05-08T10:52:26","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%9c%a8%e4%b8%8d%e8%b0%83%e7%94%a8%e5%ba%93%e7%9a%84%e6%83%85%e5%86%b5%e4%b8%8b%e5%ae%9e%e7%8e%b0ping%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/175489.html","title":{"rendered":"\u5982\u4f55\u7528PYTHON\u5728\u4e0d\u8c03\u7528\u5e93\u7684\u60c5\u51b5\u4e0b\u5b9e\u73b0ping\u547d\u4ee4"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27053355\/9f5ac061-f6b0-40c1-a7ac-3f6fa51e7221.webp\" alt=\"\u5982\u4f55\u7528PYTHON\u5728\u4e0d\u8c03\u7528\u5e93\u7684\u60c5\u51b5\u4e0b\u5b9e\u73b0ping\u547d\u4ee4\" \/><\/p>\n<p><p>\u5728\u4e0d\u8c03\u7528\u5e93\u7684\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528Python\u5b9e\u73b0ping\u547d\u4ee4\u6d89\u53ca<strong>\u4f7f\u7528\u539f\u59cb\u5957\u63a5\u5b57\u3001\u6784\u9020ICMP\u8bf7\u6c42\u3001\u53d1\u9001\u6570\u636e\u5305\u3001\u63a5\u6536\u548c\u89e3\u6790\u56de\u663e\u54cd\u5e94<\/strong>\u3002\u8fd9\u9700\u8981\u5bf9\u7f51\u7edc\u534f\u8bae\u6709\u4e00\u5b9a\u7684\u4e86\u89e3\uff0c\u5e76\u80fd\u591f\u624b\u52a8\u6784\u5efaICMP\u6570\u636e\u5305\uff0c\u53d1\u9001\u5230\u76ee\u6807\u4e3b\u673a\uff0c\u5e76\u7b49\u5f85\u56de\u5e94\u6765\u68c0\u67e5\u4e3b\u673a\u662f\u5426\u53ef\u8fbe\u3002<\/p>\n<\/p>\n<p><p><strong>\u9996\u5148\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u539f\u59cb\u5957\u63a5\u5b57<\/strong>\uff0c\u8fd9\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528socket\u6a21\u5757\u7684socket\u65b9\u6cd5\u5e76\u8bbe\u7f6e\u5408\u9002\u7684\u53c2\u6570\u6765\u5b8c\u6210\u3002\u521b\u5efa\u539f\u59cb\u5957\u63a5\u5b57\u540e\uff0c\u4f60\u9700\u8981\u624b\u52a8\u6784\u9020ICMP\u56de\u663e\u8bf7\u6c42\u6d88\u606f\u3002\u8fd9\u901a\u5e38\u5305\u62ec\u7c7b\u578b\u3001\u4ee3\u7801\u3001\u6821\u9a8c\u548c\u3001\u6807\u8bc6\u7b26\u3001\u5e8f\u5217\u53f7\u4ee5\u53ca\u6570\u636e\u90e8\u5206\u3002\u53d1\u9001\u6570\u636e\u5305\u540e\uff0c\u4f60\u5e94\u5f53\u76d1\u542c\u76f8\u5e94\u7684\u56de\u663e\u56de\u590d\uff0c\u5e76\u5bf9\u5176\u8fdb\u884c\u89e3\u7801\u4ee5\u786e\u8ba4\u76ee\u6807\u4e3b\u673a\u662f\u5426\u6536\u5230\u4e86\u4f60\u7684\u8bf7\u6c42\u3002<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u8ba9\u6211\u4eec\u6df1\u5165\u63a2\u7a76\u5982\u4f55\u5177\u4f53\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u521b\u5efa\u539f\u59cb\u5957\u63a5\u5b57<\/h2>\n<\/p>\n<p><p>\u4e3a\u4e86\u53d1\u9001\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u539f\u59cb\u5957\u63a5\u5b57\u3002Python\u7684socket\u6a21\u5757\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002\u5728Unix-like\u7cfb\u7edf\u4e0b\uff0c\u4f60\u901a\u5e38\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u624d\u80fd\u521b\u5efa\u539f\u59cb\u5957\u63a5\u5b57\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import socket<\/p>\n<p>import os<\/p>\n<h2><strong>SOCK_RAW is a powerful socket type. For more det<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ls: http:\/\/sock-raw.org\/papers\/sock_raw<\/strong><\/h2>\n<h2><strong>IPPROTO_ICMP is the Internet Control Message Protocol used for network diagnostics.<\/strong><\/h2>\n<p>icmp = socket.getprotobyname(&quot;icmp&quot;)<\/p>\n<p>try:<\/p>\n<p>    s = socket.socket(socket.AF_INET, socket.SOCK_RAW, icmp)<\/p>\n<p>except socket.error as e:<\/p>\n<p>    print(&quot;Error creating socket: &quot; + str(e))<\/p>\n<p>    os._exit(1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u5728\u8fd9\u4e4b\u540e\uff0c\u4f60\u9700\u8981\u8bbe\u7f6e\u4f60\u7684\u5957\u63a5\u5b57\u7684\u4e00\u4e9b\u9009\u9879<\/strong>\uff0c\u6bd4\u5982\u8d85\u65f6\u65f6\u95f4\uff0c\u8fd9\u6837\u4f60\u7684\u4ee3\u7801\u4e0d\u4f1a\u65e0\u9650\u671f\u5730\u7b49\u5f85\u56de\u590d\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u6784\u9020ICMP\u8bf7\u6c42<\/h2>\n<\/p>\n<p><p>\u5bf9\u4e8eICMP\u8bf7\u6c42\u6570\u636e\u5305\uff0c\u6211\u4eec\u9700\u8981\u624b\u52a8\u6784\u5efa\u3002\u5176\u4e2d\u6700\u4e3a\u91cd\u8981\u7684\u662fICMP\u5934\uff0c\u5b83\u7531\u7c7b\u578b\u3001\u4ee3\u7801\u548c\u6821\u9a8c\u548c\u7ec4\u6210\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import struct<\/p>\n<p>import time<\/p>\n<h2><strong>ICMP header fields<\/strong><\/h2>\n<p>icmp_echo_request = 8<\/p>\n<p>code = 0<\/p>\n<p>checksum = 0<\/p>\n<p>identifier = os.getpid() &amp; 0xFFFF  # Return the current process i<\/p>\n<p>sequence = 1<\/p>\n<h2><strong>Create a dummy header with a 0 checksum.<\/strong><\/h2>\n<p>header = struct.pack(&#039;bbHHh&#039;, icmp_echo_request, code, checksum, identifier, sequence)<\/p>\n<p>data = struct.pack(&#039;d&#039;, time.time())  # Use current time to ensure uniqueness<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u5728\u53d1\u9001\u6570\u636e\u4e4b\u524d\uff0c\u8ba1\u7b97\u6b63\u786e\u7684ICMP\u6821\u9a8c\u548c\u662f\u975e\u5e38\u5173\u952e\u7684<\/strong>\u3002<\/p>\n<\/p>\n<p><h2>\u4e09\u3001\u8ba1\u7b97\u6821\u9a8c\u548c<\/h2>\n<\/p>\n<p><p>\u8ba1\u7b97\u6821\u9a8c\u548c\u9700\u8981\u4e00\u4e9b\u4f4d\u64cd\u4f5c\u51fd\u6570\u3002\u901a\u5e38\uff0c\u8fd9\u4e2a\u8ba1\u7b97\u662f\u901a\u8fc7\u5c06\u6570\u636e\u62c6\u5206\u4e3a16\u4f4d\u957f\u7684\u6570\u7ec4\u6765\u5b8c\u6210\u7684\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def checksum(source_string):<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    Calculate the ICMP packet checksum of the given source string.<\/p>\n<p>    &quot;&quot;&quot;<\/p>\n<p>    sum = 0<\/p>\n<p>    max_count = (len(source_string) \/ 2) * 2<\/p>\n<p>    count = 0<\/p>\n<p>    while count &lt; max_count:<\/p>\n<p>        val = source_string[count + 1] * 256 + source_string[count]<\/p>\n<p>        sum = sum + val<\/p>\n<p>        sum = sum &amp; 0xffffffff<\/p>\n<p>        count = count + 2<\/p>\n<p>    if max_count &lt; len(source_string):<\/p>\n<p>        sum = sum + source_string[-1]<\/p>\n<p>        sum = sum &amp; 0xffffffff<\/p>\n<p>    sum = (sum &gt;&gt; 16) + (sum &amp; 0xffff)<\/p>\n<p>    sum = sum + (sum &gt;&gt; 16)<\/p>\n<p>    result = ~sum<\/p>\n<p>    result = result &amp; 0xffff<\/p>\n<p>    result = result &gt;&gt; 8 | (result &lt;&lt; 8 &amp; 0xff00)<\/p>\n<p>    return result<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528\u6b64\u51fd\u6570\u8ba1\u7b97\u6821\u9a8c\u548c\uff0c\u5e76\u91cd\u65b0\u6253\u5305ICMP\u5934\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Pack the checksum into the header.<\/p>\n<p>my_checksum = checksum(header + data)<\/p>\n<p>header = struct.pack(&#039;bbHHh&#039;, icmp_echo_request, code, my_checksum, identifier, sequence)<\/p>\n<p>packet = header + data<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u56db\u3001\u53d1\u9001\u548c\u63a5\u6536\u6570\u636e<\/h2>\n<\/p>\n<p><p>\u73b0\u5728\u5df2\u7ecf\u6784\u9020\u4e86\u5b8c\u6574\u7684ICMP\u8bf7\u6c42\uff0c\u4e0b\u4e00\u6b65\u662f\u5c06\u5176\u53d1\u9001\u51fa\u53bb\uff0c\u5e76\u76d1\u542c\u56de\u5e94\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import select<\/p>\n<p>import time<\/p>\n<h2><strong>Send the packet.<\/strong><\/h2>\n<p>s.sendto(packet, (target_host, 1))<\/p>\n<h2><strong>Wait for a reply with a timeout.<\/strong><\/h2>\n<p>timeout = 1<\/p>\n<p>ready = select.select([s], [], [], timeout)<\/p>\n<p>if ready[0] == []:<\/p>\n<p>    print(&quot;No response received.&quot;)<\/p>\n<p>else:<\/p>\n<p>    time_received = time.time()<\/p>\n<p>    rec_packet, addr = s.recvfrom(1024)<\/p>\n<p>    # Unpack the packet header for information.<\/p>\n<p>    # Add more processing logic here.<\/p>\n<p>    print(&quot;Received response from: &quot; + addr[0])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e94\u3001\u5904\u7406\u56de\u5e94<\/h2>\n<\/p>\n<p><p>\u5f53\u4f60\u63a5\u6536\u5230\u56de\u5e94\u6570\u636e\u5305\u540e\uff0c\u4f60\u9700\u8981\u89e3\u6790\u8be5\u6570\u636e\u5305\u5e76\u63d0\u53d6\u76f8\u5173\u4fe1\u606f\u4ee5\u4fbf\u53ef\u4ee5\u663e\u793a\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Processing the response packet involves unpacking the IP header and ICMP header.<\/p>\n<p>ip_header = rec_packet[:20]<\/p>\n<p>icmp_header = rec_packet[20:28]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5904\u7406\u51fd\u6570\u4f1a\u5c06\u539f\u59cb\u5b57\u8282\u89e3\u6790\u6210\u66f4\u6613\u4e8e\u7406\u89e3\u7684\u4fe1\u606f\uff0c\u6bd4\u5982\u53d1\u9001\u65f6\u95f4\u548c\u63a5\u6536\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><h2>\u516d\u3001\u5c55\u793a\u7ed3\u679c\u4e0e\u5faa\u73af\u53d1\u9001<\/h2>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u4f60\u8981\u8ba1\u7b97\u5f80\u8fd4\u65f6\u95f4\uff08RTT\uff09\uff0c\u5e76\u6309\u7167ping\u547d\u4ee4\u7684\u683c\u5f0f\u5c55\u793a\u7ed3\u679c\u3002\u4f60\u53ef\u80fd\u8fd8\u9700\u8981\u5c06\u6574\u4e2a\u8fc7\u7a0b\u653e\u5728\u5faa\u73af\u4e2d\u4ee5\u4fbf\u591a\u6b21\u6267\u884c\u6d4b\u8bd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Extract the ICMP header fields.<\/p>\n<p>icmp_type, icmp_code, icmp_checksum, icmp_id, icmp_seq = struct.unpack(&quot;bbHHh&quot;, icmp_header)<\/p>\n<h2><strong>Calculate and display the round trip time.<\/strong><\/h2>\n<p>round_trip_time = time_received - struct.unpack(&quot;d&quot;, rec_packet[28:])[0]<\/p>\n<p>print(&quot;RTT: %f ms&quot; % (round_trip_time*1000))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5c06\u4e0a\u8ff0\u6240\u6709\u90e8\u4ef6\u9002\u5f53\u7ec4\u88c5\uff0c\u4f60\u7684Python\u7a0b\u5e8f\u5c31\u80fd\u5728\u4e0d\u8c03\u7528\u5916\u90e8\u5e93\u7684\u60c5\u51b5\u4e0b\u6267\u884c\u50cfping\u547d\u4ee4\u90a3\u6837\u7684\u7f51\u7edc\u8bca\u65ad\u529f\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<ol>\n<li>\n<p><strong>\u5982\u4f55\u4f7f\u7528Python\u7f16\u5199\u81ea\u5b9a\u4e49\u7684ping\u547d\u4ee4\uff1f<\/strong><br \/>\n\u81ea\u5b9a\u4e49\u7684ping\u547d\u4ee4\u901a\u5e38\u662f\u6307\u5728\u4e0d\u4f9d\u8d56\u4e8e\u73b0\u6709\u5e93\u7684\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528Python\u8bed\u8a00\u7f16\u5199\u4e00\u4e2a\u80fd\u591f\u6a21\u62dfping\u547d\u4ee4\u884c\u5de5\u5177\u7684\u811a\u672c\u3002\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Sockets\u6a21\u5757\u6765\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u3002\u9996\u5148\uff0c\u4f60\u9700\u8981\u4f7f\u7528Sockets\u6a21\u5757\u521b\u5efa\u4e00\u4e2a\u539f\u59cb\u5957\u63a5\u5b57\uff0c\u7136\u540e\u6784\u9020ICMP\u6570\u636e\u5305\u5e76\u53d1\u9001\u7ed9\u76ee\u6807\u4e3b\u673a\u3002\u4e4b\u540e\uff0c\u901a\u8fc7\u63a5\u6536\u6765\u81ea\u76ee\u6807\u4e3b\u673a\u7684\u56de\u590d\u6765\u5224\u65ad\u76ee\u6807\u4e3b\u673a\u662f\u5426\u53ef\u8fbe\uff0c\u5e76\u8ba1\u7b97\u5f80\u8fd4\u65f6\u95f4\uff08RTT\uff09\u3002\u901a\u8fc7\u89e3\u6790\u56de\u590d\u7684\u6570\u636e\u5305\u53ef\u4ee5\u83b7\u53d6\u66f4\u591a\u7684\u4fe1\u606f\uff0c\u5982TTL\u3001IP\u5730\u5740\u7b49\u3002\u6700\u540e\uff0c\u5bf9\u4ece\u76ee\u6807\u4e3b\u673a\u63a5\u6536\u5230\u7684\u6570\u636e\u8fdb\u884c\u5904\u7406\u5e76\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u6709\u6ca1\u6709\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u7528Python\u5b9e\u73b0ping\u547d\u4ee4\u7684\u529f\u80fd\uff1f<\/strong><br \/>\n\u5f53\u7136\uff0c\u9664\u4e86\u7f16\u5199\u81ea\u5b9a\u4e49\u7684ping\u547d\u4ee4\u7684\u811a\u672c\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u6765\u5b9e\u73b0\u7c7b\u4f3c\u7684\u529f\u80fd\u3002\u4f8b\u5982\uff0cPython\u7684ping3\u5e93\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u63a5\u53e3\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b9e\u73b0\u4e3b\u673a\u7684\u8fde\u901a\u6027\u68c0\u6d4b\u3002\u53ea\u9700\u5bfc\u5165ping3\u5e93\uff0c\u521b\u5efa\u4e00\u4e2aPing\u5bf9\u8c61\uff0c\u5e76\u4f7f\u7528\u5176\u65b9\u6cd5\u5373\u53ef\u6267\u884cping\u547d\u4ee4\u5e76\u83b7\u53d6\u7ed3\u679c\u3002\u8fd9\u79cd\u65b9\u6cd5\u66f4\u7b80\u6d01\uff0c\u4e0d\u9700\u8981\u7f16\u5199\u5e95\u5c42\u64cd\u4f5c\uff0c\u4f46\u6709\u53ef\u80fd\u53d7\u9650\u4e8e\u5e93\u7684\u529f\u80fd\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u68c0\u6d4b\u76ee\u6807\u4e3b\u673a\u7684\u8fde\u901a\u6027\uff1f<\/strong><br \/>\n\u9664\u4e86\u4f7f\u7528ping\u547d\u4ee4\u7684\u529f\u80fd\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u5176\u4ed6\u65b9\u6cd5\u5728Python\u4e2d\u68c0\u6d4b\u76ee\u6807\u4e3b\u673a\u7684\u8fde\u901a\u6027\u3002\u4e00\u79cd\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u4f7f\u7528socket\u6a21\u5757\u4e2d\u7684connect()\u51fd\u6570\u6765\u5c1d\u8bd5\u4e0e\u76ee\u6807\u4e3b\u673a\u5efa\u7acbTCP\u8fde\u63a5\u3002\u5982\u679c\u8fde\u63a5\u6210\u529f\uff0c\u5219\u8bf4\u660e\u76ee\u6807\u4e3b\u673a\u53ef\u8fbe\uff1b\u5426\u5219\uff0c\u8868\u793a\u76ee\u6807\u4e3b\u673a\u4e0d\u53ef\u8fbe\u3002\u53e6\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528ping3\u5e93\u4e2d\u63d0\u4f9b\u7684Ping\u7c7b\u6765\u5b9e\u73b0\u8fde\u901a\u6027\u68c0\u6d4b\u3002\u8be5\u7c7b\u5c01\u88c5\u4e86ping\u547d\u4ee4\uff0c\u5e76\u8fd4\u56de\u76ee\u6807\u4e3b\u673a\u7684\u54cd\u5e94\u65f6\u95f4\u548c\u5176\u4ed6\u4fe1\u606f\u3002\u8fd9\u79cd\u65b9\u6cd5\u4e5f\u76f8\u5bf9\u7b80\u5355\uff0c\u4e0d\u9700\u8981\u624b\u52a8\u6784\u9020\u548c\u89e3\u6790ICMP\u6570\u636e\u5305\u3002<\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"\u5728\u4e0d\u8c03\u7528\u5e93\u7684\u60c5\u51b5\u4e0b\uff0c\u4f7f\u7528Python\u5b9e\u73b0ping\u547d\u4ee4\u6d89\u53ca\u4f7f\u7528\u539f\u59cb\u5957\u63a5\u5b57\u3001\u6784\u9020ICMP\u8bf7\u6c42\u3001\u53d1\u9001\u6570\u636e\u5305\u3001\u63a5\u6536\u548c\u89e3 [&hellip;]","protected":false},"author":3,"featured_media":175498,"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\/175489"}],"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=175489"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/175489\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/175498"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=175489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=175489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=175489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}