{"id":1166346,"date":"2025-01-15T15:31:11","date_gmt":"2025-01-15T07:31:11","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1166346.html"},"modified":"2025-01-15T15:31:15","modified_gmt":"2025-01-15T07:31:15","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e6%9f%a5ip%e5%9c%b0%e5%9d%80","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1166346.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u67e5ip\u5730\u5740"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25210507\/3fe3db29-c93a-404f-bd16-017cdd01212b.webp\" alt=\"python\u4e2d\u5982\u4f55\u67e5ip\u5730\u5740\" \/><\/p>\n<p><p> \u5728Python\u4e2d\uff0c\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u7528\u6765\u67e5\u627eIP\u5730\u5740\u3002<strong>\u4f7f\u7528 <code>socket<\/code> \u6a21\u5757\u83b7\u53d6\u4e3b\u673a\u540d\u548cIP\u5730\u5740\u3001\u4f7f\u7528 <code>requests<\/code> \u6a21\u5757\u83b7\u53d6\u5916\u90e8IP\u5730\u5740\u3001\u4f7f\u7528 <code>ipaddress<\/code> \u6a21\u5757\u5904\u7406\u548c\u64cd\u4f5cIP\u5730\u5740\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u5982 <code>netifaces<\/code> \u83b7\u53d6\u672c\u5730\u7f51\u7edc\u63a5\u53e3\u7684IP\u5730\u5740<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528 <code>socket<\/code> \u6a21\u5757\u83b7\u53d6\u4e3b\u673a\u540d\u548cIP\u5730\u5740\u662f\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528 <code>socket<\/code> \u6a21\u5757\u83b7\u53d6\u4e3b\u673a\u540d\u548cIP\u5730\u5740<\/strong>\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import socket<\/p>\n<p>hostname = socket.gethostname()<\/p>\n<p>local_ip = socket.gethostbyname(hostname)<\/p>\n<p>print(f&quot;Hostname: {hostname}&quot;)<\/p>\n<p>print(f&quot;Local IP: {local_ip}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u9996\u5148\u5bfc\u5165 <code>socket<\/code> \u6a21\u5757\uff0c\u7136\u540e\u4f7f\u7528 <code>gethostname()<\/code> \u51fd\u6570\u83b7\u53d6\u4e3b\u673a\u540d\uff0c\u5e76\u4f7f\u7528 <code>gethostbyname()<\/code> \u51fd\u6570\u5c06\u4e3b\u673a\u540d\u89e3\u6790\u4e3aIP\u5730\u5740\u3002\u8fd9\u6837\u5c31\u80fd\u83b7\u5f97\u672c\u5730\u673a\u5668\u7684IP\u5730\u5740\u3002<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bba\u5176\u4ed6\u51e0\u79cd\u67e5\u627eIP\u5730\u5740\u7684\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<h2><strong>\u4e00\u3001\u4f7f\u7528 <code>socket<\/code> \u6a21\u5757\u83b7\u53d6\u4e3b\u673a\u540d\u548cIP\u5730\u5740<\/strong><\/h2>\n<p><p><code>socket<\/code> \u6a21\u5757\u662fPython\u6807\u51c6\u5e93\u7684\u4e00\u90e8\u5206\uff0c\u7528\u4e8e\u5904\u7406\u7f51\u7edc\u76f8\u5173\u7684\u64cd\u4f5c\u3002\u5b83\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u83b7\u53d6\u548c\u5904\u7406IP\u5730\u5740\u3002<\/p>\n<\/p>\n<p><h2>\u83b7\u53d6\u672c\u5730\u4e3b\u673a\u540d\u548cIP\u5730\u5740<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">import socket<\/p>\n<p>hostname = socket.gethostname()<\/p>\n<p>local_ip = socket.gethostbyname(hostname)<\/p>\n<p>print(f&quot;Hostname: {hostname}&quot;)<\/p>\n<p>print(f&quot;Local IP: {local_ip}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u9996\u5148\u5bfc\u5165 <code>socket<\/code> \u6a21\u5757\uff0c\u7136\u540e\u4f7f\u7528 <code>gethostname()<\/code> \u51fd\u6570\u83b7\u53d6\u672c\u5730\u4e3b\u673a\u540d\uff0c\u5e76\u4f7f\u7528 <code>gethostbyname()<\/code> \u51fd\u6570\u5c06\u4e3b\u673a\u540d\u89e3\u6790\u4e3aIP\u5730\u5740\u3002\u8fd9\u6837\u5c31\u80fd\u83b7\u5f97\u672c\u5730\u673a\u5668\u7684IP\u5730\u5740\u3002<\/p>\n<\/p>\n<p><h2>\u83b7\u53d6\u8fdc\u7a0b\u4e3b\u673a\u7684IP\u5730\u5740<\/h2>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u60f3\u83b7\u53d6\u8fdc\u7a0b\u4e3b\u673a\u7684IP\u5730\u5740\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>gethostbyname()<\/code> \u51fd\u6570\u5e76\u4f20\u5165\u8fdc\u7a0b\u4e3b\u673a\u540d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import socket<\/p>\n<p>remote_host = &quot;www.google.com&quot;<\/p>\n<p>remote_ip = socket.gethostbyname(remote_host)<\/p>\n<p>print(f&quot;Remote Host: {remote_host}&quot;)<\/p>\n<p>print(f&quot;Remote IP: {remote_ip}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u8fdc\u7a0b\u4e3b\u673a\u540d <code>www.google.com<\/code> \u89e3\u6790\u4e3aIP\u5730\u5740\uff0c\u5e76\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<h2><strong>\u4e8c\u3001\u4f7f\u7528 <code>requests<\/code> \u6a21\u5757\u83b7\u53d6\u5916\u90e8IP\u5730\u5740<\/strong><\/h2>\n<p><p><code>requests<\/code> \u6a21\u5757\u662f\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684HTTP\u5e93\uff0c\u7528\u4e8e\u53d1\u9001HTTP\u8bf7\u6c42\u5e76\u5904\u7406\u54cd\u5e94\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u83b7\u53d6\u5916\u90e8IP\u5730\u5740\u3002<\/p>\n<\/p>\n<p><h2>\u83b7\u53d6\u5916\u90e8IP\u5730\u5740<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>response = requests.get(&quot;https:\/\/api.ipify.org&quot;)<\/p>\n<p>external_ip = response.text<\/p>\n<p>print(f&quot;External IP: {external_ip}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u4f7f\u7528 <code>requests.get()<\/code> \u65b9\u6cd5\u5411 <code>https:\/\/api.ipify.org<\/code> \u53d1\u9001HTTP\u8bf7\u6c42\uff0c\u8be5\u670d\u52a1\u4f1a\u8fd4\u56de\u8bf7\u6c42\u8005\u7684\u5916\u90e8IP\u5730\u5740\u3002\u7136\u540e\u6211\u4eec\u5c06\u54cd\u5e94\u7684\u6587\u672c\u5185\u5bb9\u8d4b\u503c\u7ed9 <code>external_ip<\/code> \u53d8\u91cf\u5e76\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<h2><strong>\u4e09\u3001\u4f7f\u7528 <code>ipaddress<\/code> \u6a21\u5757\u5904\u7406\u548c\u64cd\u4f5cIP\u5730\u5740<\/strong><\/h2>\n<p><p><code>ipaddress<\/code> \u6a21\u5757\u662fPython 3.3\u7248\u672c\u5f15\u5165\u7684\u4e00\u4e2a\u6807\u51c6\u5e93\uff0c\u7528\u4e8e\u5904\u7406\u548c\u64cd\u4f5cIP\u5730\u5740\u3002\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u6765\u5904\u7406IPv4\u548cIPv6\u5730\u5740\u3002<\/p>\n<\/p>\n<p><h2>\u521b\u5efa\u548c\u64cd\u4f5cIP\u5730\u5740\u5bf9\u8c61<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">import ipaddress<\/p>\n<h2><strong>\u521b\u5efaIPv4\u5730\u5740\u5bf9\u8c61<\/strong><\/h2>\n<p>ipv4_address = ipaddress.ip_address(&quot;192.168.0.1&quot;)<\/p>\n<p>print(f&quot;IPv4 Address: {ipv4_address}&quot;)<\/p>\n<h2><strong>\u521b\u5efaIPv6\u5730\u5740\u5bf9\u8c61<\/strong><\/h2>\n<p>ipv6_address = ipaddress.ip_address(&quot;2001:0db8:85a3:0000:0000:8a2e:0370:7334&quot;)<\/p>\n<p>print(f&quot;IPv6 Address: {ipv6_address}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u4f7f\u7528 <code>ipaddress.ip_address()<\/code> \u51fd\u6570\u521b\u5efaIPv4\u548cIPv6\u5730\u5740\u5bf9\u8c61\uff0c\u5e76\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><h2>\u68c0\u67e5IP\u5730\u5740\u662f\u5426\u5728\u5b50\u7f51\u5185<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">import ipaddress<\/p>\n<h2><strong>\u521b\u5efa\u5b50\u7f51\u5bf9\u8c61<\/strong><\/h2>\n<p>subnet = ipaddress.ip_network(&quot;192.168.0.0\/24&quot;)<\/p>\n<h2><strong>\u521b\u5efaIP\u5730\u5740\u5bf9\u8c61<\/strong><\/h2>\n<p>ip_addr = ipaddress.ip_address(&quot;192.168.0.10&quot;)<\/p>\n<h2><strong>\u68c0\u67e5IP\u5730\u5740\u662f\u5426\u5728\u5b50\u7f51\u5185<\/strong><\/h2>\n<p>is_in_subnet = ip_addr in subnet<\/p>\n<p>print(f&quot;Is IP {ip_addr} in subnet {subnet}? {is_in_subnet}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u521b\u5efa\u4e86\u4e00\u4e2a\u5b50\u7f51\u5bf9\u8c61\u548c\u4e00\u4e2aIP\u5730\u5740\u5bf9\u8c61\uff0c\u7136\u540e\u68c0\u67e5\u8be5IP\u5730\u5740\u662f\u5426\u5728\u5b50\u7f51\u5185\uff0c\u5e76\u6253\u5370\u7ed3\u679c\u3002<\/p>\n<\/p>\n<h2><strong>\u56db\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u5982 <code>netifaces<\/code> \u83b7\u53d6\u672c\u5730\u7f51\u7edc\u63a5\u53e3\u7684IP\u5730\u5740<\/strong><\/h2>\n<p><p><code>netifaces<\/code> \u662f\u4e00\u4e2a\u7b2c\u4e09\u65b9\u5e93\uff0c\u7528\u4e8e\u83b7\u53d6\u672c\u5730\u7f51\u7edc\u63a5\u53e3\u7684\u4fe1\u606f\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u83b7\u53d6\u672c\u5730\u7f51\u7edc\u63a5\u53e3\u7684IP\u5730\u5740\u3002<\/p>\n<\/p>\n<p><h2>\u5b89\u88c5 <code>netifaces<\/code> \u5e93<\/h2>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5 <code>netifaces<\/code> \u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install netifaces<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u83b7\u53d6\u672c\u5730\u7f51\u7edc\u63a5\u53e3\u7684IP\u5730\u5740<\/h2>\n<\/p>\n<p><pre><code class=\"language-python\">import netifaces<\/p>\n<h2><strong>\u83b7\u53d6\u6240\u6709\u7f51\u7edc\u63a5\u53e3<\/strong><\/h2>\n<p>interfaces = netifaces.interfaces()<\/p>\n<p>for interface in interfaces:<\/p>\n<p>    # \u83b7\u53d6\u63a5\u53e3\u7684\u5730\u5740\u4fe1\u606f<\/p>\n<p>    addresses = netifaces.ifaddresses(interface)<\/p>\n<p>    # \u83b7\u53d6IPv4\u5730\u5740<\/p>\n<p>    if netifaces.AF_INET in addresses:<\/p>\n<p>        ipv4_info = addresses[netifaces.AF_INET][0]<\/p>\n<p>        ipv4_address = ipv4_info[&#39;addr&#39;]<\/p>\n<p>        print(f&quot;Interface: {interface}, IPv4 Address: {ipv4_address}&quot;)<\/p>\n<p>    # \u83b7\u53d6IPv6\u5730\u5740<\/p>\n<p>    if netifaces.AF_INET6 in addresses:<\/p>\n<p>        ipv6_info = addresses[netifaces.AF_INET6][0]<\/p>\n<p>        ipv6_address = ipv6_info[&#39;addr&#39;]<\/p>\n<p>        print(f&quot;Interface: {interface}, IPv6 Address: {ipv6_address}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u9996\u5148\u83b7\u53d6\u6240\u6709\u7f51\u7edc\u63a5\u53e3\uff0c\u7136\u540e\u904d\u5386\u6bcf\u4e2a\u63a5\u53e3\u5e76\u83b7\u53d6\u5176\u5730\u5740\u4fe1\u606f\u3002\u6211\u4eec\u5206\u522b\u68c0\u67e5IPv4\u548cIPv6\u5730\u5740\uff0c\u5e76\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<h2><strong>\u4e94\u3001\u603b\u7ed3<\/strong><\/h2>\n<p><p>\u5728Python\u4e2d\uff0c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u7528\u6765\u67e5\u627eIP\u5730\u5740\u3002<strong>\u4f7f\u7528 <code>socket<\/code> \u6a21\u5757\u83b7\u53d6\u4e3b\u673a\u540d\u548cIP\u5730\u5740\u3001\u4f7f\u7528 <code>requests<\/code> \u6a21\u5757\u83b7\u53d6\u5916\u90e8IP\u5730\u5740\u3001\u4f7f\u7528 <code>ipaddress<\/code> \u6a21\u5757\u5904\u7406\u548c\u64cd\u4f5cIP\u5730\u5740\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u5982 <code>netifaces<\/code> \u83b7\u53d6\u672c\u5730\u7f51\u7edc\u63a5\u53e3\u7684IP\u5730\u5740<\/strong>\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u72ec\u7279\u7684\u7528\u9014\uff0c\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u5b8c\u6210\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4f7f\u7528 <code>socket<\/code> \u6a21\u5757\u83b7\u53d6\u4e3b\u673a\u540d\u548cIP\u5730\u5740\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u83b7\u53d6\u672c\u5730\u548c\u8fdc\u7a0b\u4e3b\u673a\u7684IP\u5730\u5740\u3002\u4f7f\u7528 <code>requests<\/code> \u6a21\u5757\uff0c\u6211\u4eec\u53ef\u4ee5\u83b7\u53d6\u5916\u90e8IP\u5730\u5740\uff0c\u800c\u4f7f\u7528 <code>ipaddress<\/code> \u6a21\u5757\uff0c\u6211\u4eec\u53ef\u4ee5\u5904\u7406\u548c\u64cd\u4f5cIP\u5730\u5740\u3002\u6700\u540e\uff0c\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93 <code>netifaces<\/code>\uff0c\u6211\u4eec\u53ef\u4ee5\u83b7\u53d6\u672c\u5730\u7f51\u7edc\u63a5\u53e3\u7684IP\u5730\u5740\u3002<\/p>\n<\/p>\n<p><p>\u8fd9\u4e9b\u65b9\u6cd5\u5728\u4e0d\u540c\u7684\u573a\u666f\u4e0b\u90fd\u975e\u5e38\u5b9e\u7528\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u5904\u7406\u548c\u64cd\u4f5cIP\u5730\u5740\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff0c\u8ba9\u4f60\u5728Python\u4e2d\u67e5\u627eIP\u5730\u5740\u65f6\u66f4\u52a0\u5f97\u5fc3\u5e94\u624b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u83b7\u53d6\u672c\u5730IP\u5730\u5740\uff1f<\/strong><br \/>\u8981\u83b7\u53d6\u672c\u5730IP\u5730\u5740\uff0c\u53ef\u4ee5\u4f7f\u7528<code>socket<\/code>\u6a21\u5757\u3002\u901a\u8fc7<code>socket.gethostbyname(socket.gethostname())<\/code>\u53ef\u4ee5\u8f7b\u677e\u83b7\u53d6\u5230\u5f53\u524d\u8ba1\u7b97\u673a\u7684IP\u5730\u5740\u3002\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u5927\u591a\u6570\u60c5\u51b5\uff0c\u4f46\u5728\u67d0\u4e9b\u7f51\u7edc\u914d\u7f6e\u4e0b\u53ef\u80fd\u53ea\u8fd4\u56de\u73af\u56de\u5730\u5740\uff08\u5982127.0.0.1\uff09\u3002 <\/p>\n<p><strong>\u5982\u4f55\u67e5\u627e\u8fdc\u7a0b\u670d\u52a1\u5668\u7684IP\u5730\u5740\uff1f<\/strong><br \/>\u8981\u67e5\u627e\u8fdc\u7a0b\u670d\u52a1\u5668\u7684IP\u5730\u5740\uff0c\u53ef\u4ee5\u4f7f\u7528<code>socket.gethostbyname(&#39;example.com&#39;)<\/code>\uff0c\u5c06<code>&#39;example.com&#39;<\/code>\u66ff\u6362\u4e3a\u76ee\u6807\u57df\u540d\u3002\u8fd9\u5c06\u8fd4\u56de\u8be5\u57df\u540d\u5bf9\u5e94\u7684IP\u5730\u5740\u3002\u786e\u4fdd\u7f51\u7edc\u8fde\u63a5\u6b63\u5e38\uff0c\u4ee5\u4fbf\u987a\u5229\u8fdb\u884c\u67e5\u627e\u3002<\/p>\n<p><strong>Python\u4e2d\u5982\u4f55\u4f7f\u7528\u5916\u90e8\u5e93\u83b7\u53d6IP\u5730\u5740\u4fe1\u606f\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>requests<\/code>\u5e93\u7ed3\u5408\u516c\u5171API\uff08\u5982ipinfo.io\u6216ip-api.com\uff09\u6765\u83b7\u53d6IP\u5730\u5740\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\u901a\u8fc7\u53d1\u9001HTTP\u8bf7\u6c42\uff0c\u53ef\u4ee5\u83b7\u5f97\u5305\u62ec\u5730\u7406\u4f4d\u7f6e\u3001ISP\u7b49\u4fe1\u606f\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>requests.get(&#39;http:\/\/ipinfo.io\/json&#39;)<\/code>\u53ef\u4ee5\u83b7\u53d6\u5f53\u524dIP\u5730\u5740\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\u786e\u4fdd\u5728\u4f7f\u7528\u8fd9\u4e9bAPI\u65f6\u9075\u5b88\u76f8\u5173\u4f7f\u7528\u9650\u5236\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u7528\u6765\u67e5\u627eIP\u5730\u5740\u3002\u4f7f\u7528 socket \u6a21\u5757\u83b7\u53d6\u4e3b\u673a\u540d\u548cIP\u5730\u5740\u3001\u4f7f\u7528 requ [&hellip;]","protected":false},"author":3,"featured_media":1166352,"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\/1166346"}],"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=1166346"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1166346\/revisions"}],"predecessor-version":[{"id":1166355,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1166346\/revisions\/1166355"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1166352"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1166346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1166346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1166346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}