{"id":1005989,"date":"2024-12-27T10:40:27","date_gmt":"2024-12-27T02:40:27","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1005989.html"},"modified":"2024-12-27T10:40:30","modified_gmt":"2024-12-27T02:40:30","slug":"python%e7%9a%84xpath%e5%a6%82%e4%bd%95%e7%94%a8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1005989.html","title":{"rendered":"python\u7684xpath\u5982\u4f55\u7528"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25082305\/695dea5f-6221-4512-9a6d-3208c3b82e6e.webp\" alt=\"python\u7684xpath\u5982\u4f55\u7528\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u4f7f\u7528XPath\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u5bfc\u5165\u6240\u9700\u5e93\u3001\u52a0\u8f7dHTML\u6216XML\u6587\u6863\u3001\u4f7f\u7528XPath\u9009\u62e9\u5668\u63d0\u53d6\u6570\u636e<\/strong>\u3002\u8fd9\u4e9b\u6b65\u9aa4\u662f\u7406\u89e3\u5e76\u6709\u6548\u4f7f\u7528XPath\u7684\u5173\u952e\u90e8\u5206\u3002XPath\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u9009\u62e9\u5de5\u5177\uff0c\u80fd\u591f\u5e2e\u52a9\u5f00\u53d1\u8005\u4ece\u590d\u6742\u7684HTML\u6216XML\u6587\u6863\u4e2d\u63d0\u53d6\u6240\u9700\u7684\u4fe1\u606f\u3002<strong>\u5176\u4e2d\uff0c\u5bfc\u5165\u6240\u9700\u5e93\u662f\u5f00\u59cb\u4f7f\u7528XPath\u7684\u7b2c\u4e00\u6b65<\/strong>\uff0c\u5982lxml\u6216xml.etree.ElementTree\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u5982\u4f55\u5728Python\u4e2d\u901a\u8fc7XPath\u8fdb\u884c\u6570\u636e\u63d0\u53d6\u7684\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5bfc\u5165\u6240\u9700\u5e93<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u4f7f\u7528XPath\u8fdb\u884c\u6570\u636e\u63d0\u53d6\u901a\u5e38\u9700\u8981\u501f\u52a9\u7b2c\u4e09\u65b9\u5e93\u3002<strong>\u6700\u5e38\u7528\u7684\u5e93\u662flxml<\/strong>\uff0c\u5b83\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684HTML\u548cXML\u5904\u7406\u529f\u80fd\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7pip\u5b89\u88c5lxml\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install lxml<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4fbf\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u5bfc\u5165\u6240\u9700\u7684\u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from lxml import etree<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u5916\uff0cPython\u5185\u7f6e\u7684xml.etree.ElementTree\u6a21\u5757\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5904\u7406XML\u6570\u636e\uff0c\u4f46\u5b83\u5bf9\u4e8eHTML\u7684\u652f\u6301\u4e0d\u5982lxml\u5168\u9762\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u52a0\u8f7dHTML\u6216XML\u6587\u6863<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528XPath\u63d0\u53d6\u6570\u636e\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u52a0\u8f7dHTML\u6216XML\u6587\u6863\u3002<strong>lxml\u5e93\u63d0\u4f9b\u4e86parse\u548cfromstring\u65b9\u6cd5<\/strong>\uff0c\u53ef\u4ee5\u4ece\u6587\u4ef6\u6216\u5b57\u7b26\u4e32\u52a0\u8f7d\u6587\u6863\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4ece\u6587\u4ef6\u52a0\u8f7d<\/p>\n<p>parser = etree.HTMLParser()<\/p>\n<p>tree = etree.parse(&#39;example.html&#39;, parser)<\/p>\n<h2><strong>\u4ece\u5b57\u7b26\u4e32\u52a0\u8f7d<\/strong><\/h2>\n<p>html_content = &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;Example&lt;\/h1&gt;&lt;\/body&gt;&lt;\/html&gt;&quot;<\/p>\n<p>tree = etree.fromstring(html_content, parser)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5bf9\u4e8eXML\u6587\u6863\uff0c\u53ef\u4ee5\u4f7f\u7528etree.XMLParser()\u4ee3\u66ffHTMLParser()\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u89e3\u6790XML\u683c\u5f0f\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528XPath\u9009\u62e9\u5668\u63d0\u53d6\u6570\u636e<\/p>\n<\/p>\n<p><p>\u4e00\u65e6\u6587\u6863\u88ab\u52a0\u8f7d\u4e3a\u6811\u7ed3\u6784\uff0c\u4fbf\u53ef\u4ee5\u4f7f\u7528XPath\u9009\u62e9\u5668\u4ece\u4e2d\u63d0\u53d6\u6240\u9700\u7684\u6570\u636e\u3002<strong>XPath\u8868\u8fbe\u5f0f\u7528\u4e8e\u9009\u62e9\u8282\u70b9\u96c6<\/strong>\uff0c\u8fd9\u4e9b\u8282\u70b9\u53ef\u4ee5\u662f\u5143\u7d20\u3001\u5c5e\u6027\u3001\u6587\u672c\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u63d0\u53d6\u6240\u6709h1\u6807\u7b7e\u7684\u6587\u672c<\/p>\n<p>h1_texts = tree.xpath(&#39;\/\/h1\/text()&#39;)<\/p>\n<p>print(h1_texts)<\/p>\n<h2><strong>\u63d0\u53d6\u5e26\u6709\u7279\u5b9a\u5c5e\u6027\u7684\u5143\u7d20<\/strong><\/h2>\n<p>elements_with_class = tree.xpath(&#39;\/\/*[@class=&quot;example&quot;]&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>XPath\u8868\u8fbe\u5f0f\u4e2d\u7684\u53cc\u659c\u6760\u201c\/\/\u201d\u8868\u793a\u9009\u62e9\u6587\u6863\u4e2d\u7684\u6240\u6709\u7b26\u5408\u6761\u4ef6\u7684\u8282\u70b9\uff0c\u800c\u5355\u659c\u6760\u201c\/\u201d\u8868\u793a\u9009\u62e9\u76f4\u63a5\u5b50\u8282\u70b9\u3002\u6b64\u5916\uff0c\u65b9\u62ec\u53f7\u201c[]\u201d\u7528\u4e8e\u6307\u5b9a\u6761\u4ef6\uff0c\u4f8b\u5982\u7279\u5b9a\u7684\u5c5e\u6027\u6216\u5c5e\u6027\u503c\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u5904\u7406\u63d0\u53d6\u7684\u6570\u636e<\/p>\n<\/p>\n<p><p>\u5728\u63d0\u53d6\u6570\u636e\u4e4b\u540e\uff0c\u901a\u5e38\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u8fdb\u4e00\u6b65\u5904\u7406\uff0c\u4ee5\u6ee1\u8db3\u5177\u4f53\u7684\u9700\u6c42\u3002<strong>\u8fd9\u53ef\u80fd\u5305\u62ec\u6e05\u7406\u6570\u636e\u3001\u8f6c\u6362\u6570\u636e\u7c7b\u578b\u6216\u683c\u5f0f\u5316\u8f93\u51fa<\/strong>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5904\u7406\u63d0\u53d6\u7684\u6587\u672c<\/p>\n<p>for text in h1_texts:<\/p>\n<p>    clean_text = text.strip()  # \u53bb\u9664\u524d\u540e\u7a7a\u767d<\/p>\n<p>    print(clean_text)<\/p>\n<h2><strong>\u5904\u7406\u5e26\u6709\u5c5e\u6027\u7684\u5143\u7d20<\/strong><\/h2>\n<p>for element in elements_with_class:<\/p>\n<p>    print(etree.tostring(element))  # \u5c06\u5143\u7d20\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u5bf9\u63d0\u53d6\u7684\u6570\u636e\u8fdb\u884c\u5904\u7406\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u96c6\u6210\u5230\u540e\u7eed\u7684\u6570\u636e\u5206\u6790\u6216\u5e94\u7528\u5f00\u53d1\u4e2d\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5e38\u89c1\u7684XPath\u8868\u8fbe\u5f0f<\/p>\n<\/p>\n<p><p>\u638c\u63e1\u5e38\u89c1\u7684XPath\u8868\u8fbe\u5f0f\u6709\u52a9\u4e8e\u63d0\u9ad8\u6570\u636e\u63d0\u53d6\u7684\u6548\u7387\u548c\u51c6\u786e\u6027\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684XPath\u8868\u8fbe\u5f0f\u53ca\u5176\u89e3\u91ca\uff1a<\/p>\n<\/p>\n<ol>\n<li><code>\/\/tag<\/code>: \u9009\u62e9\u6240\u6709\u7279\u5b9a\u6807\u7b7e\u7684\u5143\u7d20\u3002<\/li>\n<li><code>\/\/tag[@attribute=&#39;value&#39;]<\/code>: \u9009\u62e9\u5177\u6709\u7279\u5b9a\u5c5e\u6027\u503c\u7684\u5143\u7d20\u3002<\/li>\n<li><code>\/\/tag\/text()<\/code>: \u63d0\u53d6\u6807\u7b7e\u5185\u7684\u6587\u672c\u5185\u5bb9\u3002<\/li>\n<li><code>\/\/tag[position()]<\/code>: \u9009\u62e9\u7279\u5b9a\u4f4d\u7f6e\u7684\u5143\u7d20\uff0c\u5982\u7b2c\u4e00\u4e2a\u6216\u6700\u540e\u4e00\u4e2a\u3002<\/li>\n<li><code>\/\/@attribute<\/code>: \u63d0\u53d6\u6240\u6709\u5143\u7d20\u7684\u7279\u5b9a\u5c5e\u6027\u503c\u3002<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u7ed3\u5408\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u9ad8\u7ea7\u63d0\u53d6<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u7ed3\u5408\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u66f4\u9ad8\u7ea7\u7684\u6570\u636e\u63d0\u53d6\u3002<strong>lxml\u5e93\u652f\u6301\u4f7f\u7528re\u6a21\u5757\u7ed3\u5408XPath\u8fdb\u884c\u590d\u6742\u7684\u6587\u672c\u5339\u914d<\/strong>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<h2><strong>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u7279\u5b9a\u6a21\u5f0f\u7684\u6587\u672c<\/strong><\/h2>\n<p>pattern = re.compile(r&#39;\\d+&#39;)<\/p>\n<p>matches = [pattern.findall(text) for text in h1_texts if pattern.search(text)]<\/p>\n<p>print(matches)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u7ed3\u5408\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u53ef\u4ee5\u5904\u7406\u66f4\u590d\u6742\u7684\u6570\u636e\u63d0\u53d6\u9700\u6c42\uff0c\u5982\u63d0\u53d6\u7279\u5b9a\u683c\u5f0f\u7684\u6570\u5b57\u3001\u65e5\u671f\u6216\u5176\u4ed6\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u5904\u7406\u52a8\u6001\u7f51\u9875<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u52a8\u6001\u7f51\u9875\uff0c\u4f20\u7edf\u7684\u9759\u6001\u89e3\u6790\u53ef\u80fd\u65e0\u6cd5\u83b7\u53d6\u6240\u6709\u6570\u636e\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c<strong>\u53ef\u4ee5\u7ed3\u5408Selenium\u7b49\u5de5\u5177\u6765\u5904\u7406\u52a8\u6001\u52a0\u8f7d\u7684\u5185\u5bb9<\/strong>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<p>from lxml import etree<\/p>\n<h2><strong>\u4f7f\u7528Selenium\u52a0\u8f7d\u52a8\u6001\u7f51\u9875<\/strong><\/h2>\n<p>driver = webdriver.Chrome()<\/p>\n<p>driver.get(&#39;http:\/\/example.com&#39;)<\/p>\n<h2><strong>\u83b7\u53d6\u9875\u9762\u6e90\u4ee3\u7801\u5e76\u89e3\u6790<\/strong><\/h2>\n<p>html_source = driver.page_source<\/p>\n<p>tree = etree.HTML(html_source)<\/p>\n<h2><strong>\u4f7f\u7528XPath\u63d0\u53d6\u6570\u636e<\/strong><\/h2>\n<p>dynamic_data = tree.xpath(&#39;\/\/dynamic-element&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u5904\u7406JavaScript\u52a8\u6001\u751f\u6210\u7684\u5185\u5bb9\uff0c\u4ece\u800c\u5b9e\u73b0\u5bf9\u590d\u6742\u7f51\u9875\u7684\u5b8c\u6574\u6570\u636e\u63d0\u53d6\u3002<\/p>\n<\/p>\n<p><p>\u516b\u3001\u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528XPath\u8fdb\u884c\u6570\u636e\u63d0\u53d6\u65f6\uff0c<strong>\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u548c\u65b9\u6cd5\u662f\u5173\u952e<\/strong>\u3002lxml\u5e93\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u9002\u7528\u4e8e\u7edd\u5927\u591a\u6570\u7684HTML\u548cXML\u89e3\u6790\u9700\u6c42\u3002\u5bf9\u4e8e\u52a8\u6001\u7f51\u9875\uff0c\u7ed3\u5408Selenium\u7b49\u5de5\u5177\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u6ee1\u8db3\u5b9e\u9645\u5e94\u7528\u7684\u9700\u8981\u3002\u5728\u7f16\u5199XPath\u8868\u8fbe\u5f0f\u65f6\uff0c\u6ce8\u610f\u9009\u62e9\u5408\u9002\u7684\u8def\u5f84\u548c\u6761\u4ef6\uff0c\u4ee5\u63d0\u9ad8\u6548\u7387\u548c\u51c6\u786e\u6027\u3002\u6b64\u5916\uff0c\u5b9a\u671f\u66f4\u65b0\u548c\u7ef4\u62a4\u4ee3\u7801\uff0c\u4ee5\u5e94\u5bf9\u7f51\u9875\u7ed3\u6784\u7684\u53d8\u5316\uff0c\u4e5f\u662f\u786e\u4fdd\u6570\u636e\u63d0\u53d6\u5de5\u4f5c\u7684\u957f\u671f\u6709\u6548\u6027\u7684\u5173\u952e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528XPath\u89e3\u6790HTML\u6216XML\u6587\u6863\uff1f<\/strong><br \/>XPath\u662f\u4e00\u79cd\u7528\u4e8e\u5728XML\u6587\u6863\u4e2d\u67e5\u627e\u4fe1\u606f\u7684\u8bed\u8a00\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>lxml<\/code>\u5e93\u6216<code>xml.etree.ElementTree<\/code>\u5e93\u6765\u5904\u7406XPath\u67e5\u8be2\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5<code>lxml<\/code>\u5e93\u5e76\u4f7f\u7528<code>from lxml import etree<\/code>\u6765\u89e3\u6790\u6587\u6863\uff0c\u5e76\u901a\u8fc7<code>tree.xpath(&#39;your_xpath_expression&#39;)<\/code>\u6765\u63d0\u53d6\u6240\u9700\u6570\u636e\u3002\u786e\u4fdd\u60a8\u7684\u6587\u6863\u662f\u6709\u6548\u7684XML\u6216HTML\u683c\u5f0f\uff0c\u4ee5\u4fbfXPath\u80fd\u591f\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<p><strong>\u4f7f\u7528XPath\u65f6\u5982\u4f55\u5904\u7406\u547d\u540d\u7a7a\u95f4\uff1f<\/strong><br \/>\u5728\u5904\u7406\u5e26\u6709\u547d\u540d\u7a7a\u95f4\u7684XML\u6587\u6863\u65f6\uff0c\u4f7f\u7528XPath\u67e5\u8be2\u53ef\u80fd\u4f1a\u53d8\u5f97\u590d\u6742\u3002\u60a8\u9700\u8981\u5728\u67e5\u8be2\u4e2d\u5b9a\u4e49\u547d\u540d\u7a7a\u95f4\uff0c\u5e76\u5728XPath\u8868\u8fbe\u5f0f\u4e2d\u4f7f\u7528\u76f8\u5e94\u7684\u524d\u7f00\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>tree.xpath(&#39;\/\/prefix:element_name&#39;, namespaces={&#39;prefix&#39;: &#39;namespace_uri&#39;})<\/code>\u6765\u63d0\u53d6\u5e26\u6709\u547d\u540d\u7a7a\u95f4\u7684\u5143\u7d20\u3002\u786e\u4fdd\u6b63\u786e\u8bbe\u7f6e\u547d\u540d\u7a7a\u95f4\uff0c\u4ee5\u4fbfXPath\u80fd\u591f\u51c6\u786e\u5339\u914d\u5143\u7d20\u3002<\/p>\n<p><strong>\u5728\u4f7f\u7528XPath\u65f6\uff0c\u5982\u4f55\u8c03\u8bd5\u548c\u4f18\u5316\u6211\u7684\u67e5\u8be2\uff1f<\/strong><br \/>\u8c03\u8bd5XPath\u67e5\u8be2\u7684\u6700\u4f73\u65b9\u6cd5\u662f\u9010\u6b65\u6784\u5efa\u67e5\u8be2\u5e76\u9a8c\u8bc1\u6bcf\u4e00\u6b65\u7684\u7ed3\u679c\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528XPath\u5de5\u5177\u6216\u5728\u7ebf\u89e3\u6790\u5668\u6765\u6d4b\u8bd5\u548c\u4f18\u5316\u60a8\u7684\u67e5\u8be2\u3002\u6b64\u5916\uff0c\u68c0\u67e5\u6587\u6863\u7684\u7ed3\u6784\u548c\u5143\u7d20\u7684\u5c42\u6b21\u5173\u7cfb\u4e5f\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u786e\u4fddXPath\u8868\u8fbe\u5f0f\u5c3d\u53ef\u80fd\u7b80\u6d01\uff0c\u4ee5\u63d0\u9ad8\u67e5\u8be2\u6548\u7387\u5e76\u51cf\u5c11\u89e3\u6790\u65f6\u95f4\u3002\u4f7f\u7528<code>\/\/<\/code>\u8fdb\u884c\u5168\u5c40\u641c\u7d22\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6027\u80fd\u95ee\u9898\uff0c\u5c3d\u91cf\u4f7f\u7528\u5177\u4f53\u7684\u8def\u5f84\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u4f7f\u7528XPath\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u5bfc\u5165\u6240\u9700\u5e93\u3001\u52a0\u8f7dHTML\u6216XML\u6587\u6863\u3001\u4f7f\u7528XPath\u9009\u62e9\u5668\u63d0\u53d6\u6570\u636e\u3002 [&hellip;]","protected":false},"author":3,"featured_media":1005997,"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\/1005989"}],"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=1005989"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1005989\/revisions"}],"predecessor-version":[{"id":1005998,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1005989\/revisions\/1005998"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1005997"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1005989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1005989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1005989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}