{"id":949999,"date":"2024-12-27T00:22:06","date_gmt":"2024-12-26T16:22:06","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/949999.html"},"modified":"2024-12-27T00:22:08","modified_gmt":"2024-12-26T16:22:08","slug":"python%e5%a6%82%e4%bd%95%e5%a4%8d%e5%88%b6xpath","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/949999.html","title":{"rendered":"python\u5982\u4f55\u590d\u5236xpath"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25084753\/43ca89dd-3c70-4520-9055-b4413b5565dd.webp\" alt=\"python\u5982\u4f55\u590d\u5236xpath\" \/><\/p>\n<p><p> <strong>\u8981\u5728Python\u4e2d\u590d\u5236XPath\uff0c\u53ef\u4ee5\u4f7f\u7528Selenium\u5e93\u3002\u901a\u8fc7Selenium\u5e93\uff0c\u53ef\u4ee5\u89e3\u6790\u7f51\u9875\u5185\u5bb9\u5e76\u63d0\u53d6\u51fa\u7279\u5b9a\u7684XPath\u3002\u4e3b\u8981\u6b65\u9aa4\u5305\u62ec\uff1a\u4f7f\u7528WebDriver\u52a0\u8f7d\u7f51\u9875\u3001\u5b9a\u4f4d\u5143\u7d20\u3001\u83b7\u53d6XPath\u3002<\/strong>\u5229\u7528Selenium\u7684\u5f3a\u5927\u529f\u80fd\uff0c\u53ef\u4ee5\u81ea\u52a8\u5316\u5730\u5728\u7f51\u9875\u4e0a\u64cd\u4f5c\uff0c\u5e76\u63d0\u53d6\u6240\u9700\u7684\u4fe1\u606f\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5\u548c\u8bbe\u7f6eSelenium<\/p>\n<\/p>\n<p><p>\u8981\u5f00\u59cb\u4f7f\u7528Selenium\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5Selenium\u5e93\u548cWebDriver\u3002WebDriver\u662fSelenium\u7684\u4e00\u90e8\u5206\uff0c\u5b83\u53ef\u4ee5\u63a7\u5236\u6d4f\u89c8\u5668\u3002\u4ee5\u4e0b\u662f\u5b89\u88c5\u548c\u8bbe\u7f6e\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5Selenium\u5e93<\/strong><\/p>\n<p>\u4f7f\u7528Python\u5305\u7ba1\u7406\u5de5\u5177pip\u5b89\u88c5Selenium\u5e93\u3002\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install selenium<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4e0b\u8f7dWebDriver<\/strong><\/p>\n<p>\u6839\u636e\u60a8\u4f7f\u7528\u7684\u6d4f\u89c8\u5668\u4e0b\u8f7d\u76f8\u5e94\u7684WebDriver\u3002\u5e38\u7528\u7684WebDriver\u6709ChromeDriver\u548cGeckoDriver\uff08\u7528\u4e8eFirefox\uff09\u3002\u4e0b\u8f7d\u540e\uff0c\u5c06\u5176\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6eWebDriver<\/strong><\/p>\n<p>\u5728Python\u811a\u672c\u4e2d\u5f15\u5165Selenium\uff0c\u5e76\u914d\u7f6eWebDriver\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8eChrome\u6d4f\u89c8\u5668\uff0c\u60a8\u9700\u8981\u8bbe\u7f6eChromeDriver\u7684\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<h2><strong>\u8bbe\u7f6eChromeDriver\u7684\u8def\u5f84<\/strong><\/h2>\n<p>driver_path = &#39;\/path\/to\/chromedriver&#39;<\/p>\n<p>driver = webdriver.Chrome(executable_path=driver_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u52a0\u8f7d\u7f51\u9875\u548c\u5b9a\u4f4d\u5143\u7d20<\/p>\n<\/p>\n<p><p>\u5728\u914d\u7f6e\u597dWebDriver\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u52a0\u8f7d\u7f51\u9875\uff0c\u5e76\u5229\u7528XPath\u5b9a\u4f4d\u5143\u7d20\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u52a0\u8f7d\u7f51\u9875<\/strong><\/p>\n<p>\u4f7f\u7528WebDriver\u7684<code>get()<\/code>\u65b9\u6cd5\u52a0\u8f7d\u76ee\u6807\u7f51\u9875\u3002\u4f8b\u5982\uff0c\u52a0\u8f7d\u4e00\u4e2a\u793a\u4f8b\u7f51\u9875\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">url = &#39;http:\/\/example.com&#39;<\/p>\n<p>driver.get(url)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b9a\u4f4d\u5143\u7d20<\/strong><\/p>\n<p>\u4f7f\u7528Selenium\u7684<code>find_element_by_xpath()<\/code>\u65b9\u6cd5\u5b9a\u4f4d\u7f51\u9875\u5143\u7d20\u3002XPath\u662f\u4e00\u79cd\u7528\u4e8e\u5728XML\u6587\u6863\u4e2d\u67e5\u627e\u5143\u7d20\u7684\u8bed\u8a00\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7cbe\u51c6\u5b9a\u4f4d\u7f51\u9875\u5143\u7d20\u3002\u4f8b\u5982\uff0c\u5b9a\u4f4d\u7f51\u9875\u4e2d\u7684\u4e00\u4e2a\u6309\u94ae\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">button_xpath = &#39;\/\/*[@id=&quot;submit-button&quot;]&#39;<\/p>\n<p>button_element = driver.find_element_by_xpath(button_xpath)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u590d\u5236XPath<\/p>\n<\/p>\n<p><p>\u5728\u6210\u529f\u5b9a\u4f4d\u5143\u7d20\u540e\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\u64cd\u4f5c\uff0c\u590d\u5236\u6216\u83b7\u53d6\u8be5\u5143\u7d20\u7684XPath\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u83b7\u53d6\u5143\u7d20\u5c5e\u6027<\/strong><\/p>\n<p>\u53ef\u4ee5\u83b7\u53d6\u8be5\u5143\u7d20\u7684\u5c5e\u6027\u6216\u6587\u672c\u5185\u5bb9\uff0c\u8fd9\u5728\u540e\u7eed\u64cd\u4f5c\u4e2d\u53ef\u80fd\u4f1a\u6709\u7528\u3002\u4f8b\u5982\uff0c\u83b7\u53d6\u6309\u94ae\u7684\u6587\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">button_text = button_element.text<\/p>\n<p>print(button_text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1XPath<\/strong><\/p>\n<p>\u5728\u4f7f\u7528XPath\u5b9a\u4f4d\u5143\u7d20\u540e\uff0c\u53ef\u4ee5\u9a8c\u8bc1XPath\u662f\u5426\u51c6\u786e\u5b9a\u4f4d\u5230\u76ee\u6807\u5143\u7d20\u3002\u901a\u8fc7\u67e5\u770b\u5b9a\u4f4d\u5230\u7684\u5143\u7d20\u5c5e\u6027\u6216\u5185\u5bb9\uff0c\u786e\u4fddXPath\u7684\u51c6\u786e\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u52a8\u6001\u751f\u6210XPath<\/strong><\/p>\n<p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u52a8\u6001\u751f\u6210XPath\u3002\u53ef\u4ee5\u6839\u636e\u5143\u7d20\u7684\u5c5e\u6027\u548c\u5c42\u7ea7\u5173\u7cfb\uff0c\u62fc\u63a5\u751f\u6210\u65b0\u7684XPath\u3002\u4f8b\u5982\uff0c\u57fa\u4e8e\u5143\u7d20\u7684\u6807\u7b7e\u540d\u548c\u7c7b\u540d\u751f\u6210XPath\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">tag_name = button_element.tag_name<\/p>\n<p>class_name = button_element.get_attribute(&#39;class&#39;)<\/p>\n<p>dynamic_xpath = f&quot;\/\/{tag_name}[@class=&#39;{class_name}&#39;]&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u81ea\u52a8\u5316\u64cd\u4f5c\u548c\u63d0\u53d6\u4fe1\u606f<\/p>\n<\/p>\n<p><p>\u5229\u7528Selenium\u7684\u529f\u80fd\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u590d\u5236XPath\uff0c\u8fd8\u53ef\u4ee5\u5b9e\u73b0\u7f51\u9875\u7684\u81ea\u52a8\u5316\u64cd\u4f5c\uff0c\u5e76\u63d0\u53d6\u6240\u9700\u4fe1\u606f\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u81ea\u52a8\u5316\u64cd\u4f5c<\/strong><\/p>\n<p>Selenium\u53ef\u4ee5\u6a21\u62df\u7528\u6237\u64cd\u4f5c\uff0c\u4f8b\u5982\u70b9\u51fb\u6309\u94ae\u3001\u8f93\u5165\u6587\u672c\u7b49\u3002\u901a\u8fc7\u8fd9\u4e9b\u64cd\u4f5c\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u7f51\u9875\u7684\u81ea\u52a8\u5316\u4ea4\u4e92\u3002\u4f8b\u5982\uff0c\u70b9\u51fb\u4e00\u4e2a\u6309\u94ae\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">button_element.click()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u63d0\u53d6\u4fe1\u606f<\/strong><\/p>\n<p>\u9664\u4e86\u590d\u5236XPath\uff0c\u8fd8\u53ef\u4ee5\u63d0\u53d6\u7f51\u9875\u4e2d\u7684\u4fe1\u606f\uff0c\u6bd4\u5982\u83b7\u53d6\u7279\u5b9a\u5143\u7d20\u7684\u6587\u672c\u3001\u5c5e\u6027\u7b49\u3002\u901a\u8fc7XPath\u5b9a\u4f4d\u5143\u7d20\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528Selenium\u7684\u65b9\u6cd5\u63d0\u53d6\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">paragraph_xpath = &#39;\/\/*[@id=&quot;content&quot;]\/p[1]&#39;<\/p>\n<p>paragraph_element = driver.find_element_by_xpath(paragraph_xpath)<\/p>\n<p>paragraph_text = paragraph_element.text<\/p>\n<p>print(paragraph_text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5904\u7406\u52a8\u6001\u7f51\u9875<\/strong><\/p>\n<p>\u5bf9\u4e8e\u52a8\u6001\u52a0\u8f7d\u5185\u5bb9\u7684\u7f51\u9875\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528Selenium\u7684<code>WebDriverW<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t<\/code>\u6765\u7b49\u5f85\u5143\u7d20\u52a0\u8f7d\u5b8c\u6210\u540e\u518d\u8fdb\u884c\u64cd\u4f5c\u3002\u4f8b\u5982\uff0c\u7b49\u5f85\u4e00\u4e2a\u5143\u7d20\u53ef\u89c1\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium.webdriver.common.by import By<\/p>\n<p>from selenium.webdriver.support.ui import WebDriverWait<\/p>\n<p>from selenium.webdriver.support import expected_conditions as EC<\/p>\n<h2><strong>\u7b49\u5f85\u5143\u7d20\u53ef\u89c1<\/strong><\/h2>\n<p>wait = WebDriverWait(driver, 10)<\/p>\n<p>element = wait.until(EC.visibility_of_element_located((By.XPATH, &#39;\/\/*[@id=&quot;dynamic-element&quot;]&#39;)))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u5b9e\u8df5\u4e2d\u7684\u6ce8\u610f\u4e8b\u9879<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u8df5\u4e2d\u4f7f\u7528Selenium\u548cXPath\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u4e00\u4e9b\u95ee\u9898\uff0c\u4ee5\u786e\u4fdd\u64cd\u4f5c\u7684\u6210\u529f\u548c\u6548\u7387\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>XPath\u7684\u9009\u62e9<\/strong><\/p>\n<p>\u5728\u9009\u62e9XPath\u65f6\uff0c\u5e94\u5c3d\u91cf\u9009\u62e9\u552f\u4e00\u4e14\u7b80\u6d01\u7684XPath\uff0c\u4ee5\u63d0\u9ad8\u5b9a\u4f4d\u7684\u51c6\u786e\u6027\u3002\u907f\u514d\u4f7f\u7528\u8fc7\u4e8e\u590d\u6742\u7684XPath\uff0c\u4ee5\u514d\u5728\u7f51\u9875\u7ed3\u6784\u53d8\u5316\u65f6\u5931\u6548\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5904\u7406\u5f02\u5e38<\/strong><\/p>\n<p>\u5728\u4f7f\u7528Selenium\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5f02\u5e38\uff0c\u5982\u5143\u7d20\u672a\u627e\u5230\u3001\u5143\u7d20\u4e0d\u53ef\u70b9\u51fb\u7b49\u3002\u9700\u8981\u4f7f\u7528\u5f02\u5e38\u5904\u7406\u673a\u5236\u6765\u6355\u83b7\u548c\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>try-except<\/code>\u7ed3\u6784\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    button_element = driver.find_element_by_xpath(button_xpath)<\/p>\n<p>    button_element.click()<\/p>\n<p>except Exception as e:<\/p>\n<p>    print(f&quot;An error occurred: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f18\u5316\u6027\u80fd<\/strong><\/p>\n<p>\u5728\u64cd\u4f5c\u5927\u91cf\u5143\u7d20\u6216\u590d\u6742\u7f51\u9875\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u6027\u80fd\u95ee\u9898\u3002\u901a\u8fc7\u4f18\u5316XPath\u3001\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u64cd\u4f5c\uff0c\u53ef\u4ee5\u63d0\u9ad8\u811a\u672c\u7684\u6267\u884c\u6548\u7387\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u5168\u548c\u9690\u79c1<\/strong><\/p>\n<p>\u5728\u4f7f\u7528Selenium\u8bbf\u95ee\u7f51\u9875\u65f6\uff0c\u5e94\u6ce8\u610f\u9075\u5faa\u76f8\u5173\u7684\u6cd5\u5f8b\u6cd5\u89c4\uff0c\u786e\u4fdd\u4e0d\u4f1a\u4fb5\u72af\u4ed6\u4eba\u7684\u9690\u79c1\u6216\u8fdd\u53cd\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u53ef\u4ee5\u5728Python\u4e2d\u4f7f\u7528Selenium\u5e93\u590d\u5236\u548c\u64cd\u4f5cXPath\u3002\u8fd9\u4e00\u8fc7\u7a0b\u4e0d\u4ec5\u6d89\u53ca\u5230XPath\u7684\u89e3\u6790\u548c\u63d0\u53d6\uff0c\u8fd8\u5305\u62ec\u5bf9\u7f51\u9875\u7684\u81ea\u52a8\u5316\u64cd\u4f5c\u548c\u4fe1\u606f\u63d0\u53d6\u3002\u5728\u5b9e\u8df5\u4e2d\uff0c\u5229\u7528Selenium\u7684\u5f3a\u5927\u529f\u80fd\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u7f51\u9875\u7684\u5168\u9762\u63a7\u5236\u548c\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u627e\u5230\u5e76\u590d\u5236XPath\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5e93\u5982lxml\u6216BeautifulSoup\u6765\u89e3\u6790HTML\u6587\u6863\u3002\u4f7f\u7528lxml\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7XPath\u8bed\u6cd5\u8f7b\u677e\u627e\u5230\u6240\u9700\u5143\u7d20\u3002\u4f7f\u7528<code>tree.xpath(&#39;\u4f60\u7684XPath&#39;)<\/code>\u65b9\u6cd5\u53ef\u4ee5\u83b7\u53d6\u5339\u914d\u7684\u8282\u70b9\u3002\u5728\u4ee3\u7801\u4e2d\u83b7\u53d6\u5230\u540e\uff0c\u53ef\u4ee5\u5c06\u5176\u5185\u5bb9\u590d\u5236\u5230\u6240\u9700\u4f4d\u7f6e\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u590d\u5236XPath\u65f6\uff0c\u6709\u54ea\u4e9b\u5e38\u89c1\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u4f7f\u7528XPath\u65f6\uff0c\u5e38\u89c1\u9519\u8bef\u5305\u62ec\u8def\u5f84\u4e66\u5199\u9519\u8bef\u3001\u672a\u6b63\u786e\u5904\u7406\u547d\u540d\u7a7a\u95f4\u4ee5\u53ca\u9009\u62e9\u5668\u4e0d\u591f\u7cbe\u786e\u7b49\u3002\u8fd9\u4e9b\u95ee\u9898\u53ef\u80fd\u5bfc\u81f4\u65e0\u6cd5\u627e\u5230\u5143\u7d20\u3002\u786e\u4fddXPath\u8868\u8fbe\u5f0f\u6b63\u786e\u4e14\u4e0e\u6587\u6863\u7ed3\u6784\u5339\u914d\u662f\u5173\u952e\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\uff0c\u6709\u54ea\u4e9b\u5e93\u53ef\u4ee5\u5e2e\u52a9\u6211\u83b7\u53d6\u548c\u590d\u5236XPath\uff1f<\/strong><br \/>\u6709\u591a\u4e2a\u5e93\u53ef\u4ee5\u5e2e\u52a9\u4f60\u83b7\u53d6\u548c\u590d\u5236XPath\uff0c\u5305\u62eclxml\u3001BeautifulSoup\u548cScrapy\u3002lxml\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684XPath\u652f\u6301\uff0c\u800cBeautifulSoup\u66f4\u9002\u5408\u7b80\u5355\u7684HTML\u89e3\u6790\u3002Scrapy\u4f5c\u4e3a\u4e00\u4e2a\u722c\u866b\u6846\u67b6\uff0c\u5185\u7f6e\u4e86\u5904\u7406XPath\u7684\u529f\u80fd\uff0c\u9002\u5408\u7528\u4e8e\u5927\u89c4\u6a21\u6570\u636e\u6293\u53d6\u3002\u9009\u62e9\u5408\u9002\u7684\u5e93\u53d6\u51b3\u4e8e\u9879\u76ee\u7684\u9700\u6c42\u548c\u590d\u6742\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728Python\u4e2d\u590d\u5236XPath\uff0c\u53ef\u4ee5\u4f7f\u7528Selenium\u5e93\u3002\u901a\u8fc7Selenium\u5e93\uff0c\u53ef\u4ee5\u89e3\u6790\u7f51\u9875\u5185\u5bb9\u5e76\u63d0\u53d6\u51fa [&hellip;]","protected":false},"author":3,"featured_media":950002,"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\/949999"}],"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=949999"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/949999\/revisions"}],"predecessor-version":[{"id":950004,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/949999\/revisions\/950004"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/950002"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=949999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=949999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=949999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}