{"id":1094007,"date":"2025-01-08T14:36:47","date_gmt":"2025-01-08T06:36:47","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1094007.html"},"modified":"2025-01-08T14:36:49","modified_gmt":"2025-01-08T06:36:49","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%86%99%e5%85%a5html%e6%96%87%e4%bb%b6%e6%95%b0%e6%8d%ae-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1094007.html","title":{"rendered":"\u5982\u4f55\u7528python\u5199\u5165html\u6587\u4ef6\u6570\u636e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24210323\/1e389caa-e892-441c-a570-93cb993b9088.webp\" alt=\"\u5982\u4f55\u7528python\u5199\u5165html\u6587\u4ef6\u6570\u636e\" \/><\/p>\n<p><p> <strong>\u8981\u7528Python\u5199\u5165HTML\u6587\u4ef6\u6570\u636e\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u5982\u4f7f\u7528Python\u5185\u7f6e\u7684\u6587\u4ef6\u64cd\u4f5c\u51fd\u6570\u3001\u7ed3\u5408HTML\u6a21\u677f\u5e93\u5982Jinja2\u3001\u6216\u4f7f\u7528\u4e13\u95e8\u7684HTML\u751f\u6210\u5e93\u5982BeautifulSoup\u7b49\u3002\u6700\u7b80\u5355\u7684\u65b9\u5f0f\u662f\u76f4\u63a5\u4f7f\u7528Python\u5185\u7f6e\u51fd\u6570\u8fdb\u884c\u5199\u5165<\/strong>\uff0c\u8fd9\u79cd\u65b9\u6cd5\u9002\u5408\u521d\u5b66\u8005\uff0c\u5e76\u4e14\u5728\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u7b80\u5355\u7684HTML\u5199\u5165\u64cd\u4f5c\u65f6\u975e\u5e38\u65b9\u4fbf\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u6765\u5199\u5165HTML\u6587\u4ef6\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528Python\u5185\u7f6e\u6587\u4ef6\u64cd\u4f5c\u51fd\u6570<\/h3>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5185\u7f6e\u51fd\u6570\u6765\u8fdb\u884c\u6587\u4ef6\u64cd\u4f5c\uff0c\u8fd9\u4e9b\u51fd\u6570\u975e\u5e38\u9002\u5408\u7528\u6765\u521b\u5efa\u548c\u5199\u5165HTML\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u548c\u5199\u5165\u4e00\u4e2aHTML\u6587\u4ef6<\/p>\n<p>html_content = &#39;&#39;&#39;<\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html lang=&quot;en&quot;&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>    &lt;meta charset=&quot;UTF-8&quot;&gt;<\/p>\n<p>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<\/p>\n<p>    &lt;title&gt;Document&lt;\/title&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>    &lt;h1&gt;Hello, World!&lt;\/h1&gt;<\/p>\n<p>    &lt;p&gt;This is a paragraph.&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p>&#39;&#39;&#39;<\/p>\n<h2><strong>\u5199\u5165HTML\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;index.html&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(html_content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u9996\u5148\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5305\u542bHTML\u5185\u5bb9\u7684\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u4f7f\u7528<code>open<\/code>\u51fd\u6570\u521b\u5efa\u4e00\u4e2a\u65b0\u7684HTML\u6587\u4ef6\uff0c\u5e76\u5c06\u5b57\u7b26\u4e32\u5185\u5bb9\u5199\u5165\u8be5\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528Jinja2\u6a21\u677f\u5e93<\/h3>\n<\/p>\n<p><p>Jinja2\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684Python\u6a21\u677f\u5f15\u64ce\uff0c\u9002\u7528\u4e8e\u751f\u6210HTML\u6587\u4ef6\u3002\u5b83\u5141\u8bb8\u5c06HTML\u548cPython\u903b\u8f91\u5206\u5f00\uff0c\u4fbf\u4e8e\u7ba1\u7406\u548c\u7ef4\u62a4\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528Jinja2\u751f\u6210HTML\u6587\u4ef6\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from jinja2 import Environment, FileSystemLoader<\/p>\n<h2><strong>\u8bbe\u7f6eJinja2\u6a21\u677f\u73af\u5883<\/strong><\/h2>\n<p>env = Environment(loader=FileSystemLoader(&#39;templates&#39;))<\/p>\n<h2><strong>\u52a0\u8f7d\u6a21\u677f<\/strong><\/h2>\n<p>template = env.get_template(&#39;template.html&#39;)<\/p>\n<h2><strong>\u5b9a\u4e49\u6a21\u677f\u53d8\u91cf<\/strong><\/h2>\n<p>data = {<\/p>\n<p>    &#39;title&#39;: &#39;My Webpage&#39;,<\/p>\n<p>    &#39;header&#39;: &#39;Welcome to My Webpage&#39;,<\/p>\n<p>    &#39;content&#39;: &#39;This is a paragraph on my webpage.&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u6e32\u67d3\u6a21\u677f<\/strong><\/h2>\n<p>html_content = template.render(data)<\/p>\n<h2><strong>\u5199\u5165HTML\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;output.html&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(html_content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u8bbe\u7f6e\u4e86Jinja2\u6a21\u677f\u73af\u5883\uff0c\u5e76\u52a0\u8f7d\u4e86\u4e00\u4e2aHTML\u6a21\u677f\u6587\u4ef6<code>template.html<\/code>\u3002\u7136\u540e\u5b9a\u4e49\u4e86\u4e00\u4e9b\u6a21\u677f\u53d8\u91cf\uff0c\u5e76\u4f7f\u7528\u8fd9\u4e9b\u53d8\u91cf\u6e32\u67d3\u6a21\u677f\uff0c\u6700\u540e\u5c06\u6e32\u67d3\u540e\u7684HTML\u5185\u5bb9\u5199\u5165\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528BeautifulSoup\u5e93<\/h3>\n<\/p>\n<p><p>BeautifulSoup\u662f\u4e00\u4e2a\u7528\u4e8e\u89e3\u6790HTML\u548cXML\u6587\u6863\u7684Python\u5e93\uff0c\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u7528\u6765\u89e3\u6790\u548c\u63d0\u53d6HTML\u5185\u5bb9\uff0c\u8fd8\u53ef\u4ee5\u751f\u6210\u548c\u4fee\u6539HTML\u5185\u5bb9\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528BeautifulSoup\u751f\u6210HTML\u6587\u4ef6\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bs4 import BeautifulSoup<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u7a7a\u7684HTML\u6587\u6863<\/strong><\/h2>\n<p>soup = BeautifulSoup(&#39;&lt;html&gt;&lt;\/html&gt;&#39;, &#39;html.parser&#39;)<\/p>\n<h2><strong>\u6dfb\u52a0doctype<\/strong><\/h2>\n<p>soup.insert(0, &#39;&lt;!DOCTYPE html&gt;&#39;)<\/p>\n<h2><strong>\u6dfb\u52a0head\u548cbody\u6807\u7b7e<\/strong><\/h2>\n<p>head = soup.new_tag(&#39;head&#39;)<\/p>\n<p>body = soup.new_tag(&#39;body&#39;)<\/p>\n<p>soup.html.append(head)<\/p>\n<p>soup.html.append(body)<\/p>\n<h2><strong>\u6dfb\u52a0meta\u548ctitle\u6807\u7b7e<\/strong><\/h2>\n<p>meta = soup.new_tag(&#39;meta&#39;, charset=&#39;UTF-8&#39;)<\/p>\n<p>title = soup.new_tag(&#39;title&#39;)<\/p>\n<p>title.string = &#39;My Webpage&#39;<\/p>\n<p>head.append(meta)<\/p>\n<p>head.append(title)<\/p>\n<h2><strong>\u6dfb\u52a0\u5185\u5bb9\u5230body\u6807\u7b7e<\/strong><\/h2>\n<p>h1 = soup.new_tag(&#39;h1&#39;)<\/p>\n<p>h1.string = &#39;Hello, World!&#39;<\/p>\n<p>p = soup.new_tag(&#39;p&#39;)<\/p>\n<p>p.string = &#39;This is a paragraph.&#39;<\/p>\n<p>body.append(h1)<\/p>\n<p>body.append(p)<\/p>\n<h2><strong>\u5199\u5165HTML\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;index.html&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(str(soup.prettify()))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u521b\u5efa\u4e86\u4e00\u4e2a\u7a7a\u7684HTML\u6587\u6863\uff0c\u5e76\u4f7f\u7528<code>new_tag<\/code>\u65b9\u6cd5\u6dfb\u52a0\u5404\u79cdHTML\u5143\u7d20\u3002\u6700\u540e\uff0c\u5c06\u751f\u6210\u7684HTML\u5185\u5bb9\u5199\u5165\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4f7f\u7528HTML\u5e93<\/h3>\n<\/p>\n<p><p>Python\u7684<code>html<\/code>\u5e93\u662f\u4e00\u4e2a\u5185\u7f6e\u7684\u5e93\uff0c\u53ef\u4ee5\u7528\u6765\u5904\u7406HTML\u76f8\u5173\u7684\u64cd\u4f5c\u3002\u867d\u7136\u5b83\u7684\u4e3b\u8981\u76ee\u7684\u662f\u5904\u7406HTML\u8f6c\u4e49\u5b57\u7b26\uff0c\u4f46\u4e5f\u53ef\u4ee5\u7528\u6765\u751f\u6210HTML\u5185\u5bb9\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528<code>html<\/code>\u5e93\u751f\u6210HTML\u6587\u4ef6\u7684\u7b80\u5355\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import html<\/p>\n<h2><strong>\u5b9a\u4e49HTML\u5185\u5bb9<\/strong><\/h2>\n<p>html_content = &#39;&#39;&#39;<\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html lang=&quot;en&quot;&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>    &lt;meta charset=&quot;UTF-8&quot;&gt;<\/p>\n<p>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<\/p>\n<p>    &lt;title&gt;Document&lt;\/title&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>    &lt;h1&gt;Hello, World!&lt;\/h1&gt;<\/p>\n<p>    &lt;p&gt;This is a paragraph.&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p>&#39;&#39;&#39;<\/p>\n<h2><strong>\u4f7f\u7528html.escape\u5904\u7406HTML\u5185\u5bb9<\/strong><\/h2>\n<p>escaped_content = html.escape(html_content)<\/p>\n<h2><strong>\u5199\u5165HTML\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;index.html&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(escaped_content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>html.escape<\/code>\u65b9\u6cd5\u5904\u7406\u4e86HTML\u5185\u5bb9\uff0c\u7136\u540e\u5c06\u5176\u5199\u5165\u6587\u4ef6\u3002\u8fd9\u4e2a\u65b9\u6cd5\u9002\u7528\u4e8e\u9700\u8981\u8f6c\u4e49HTML\u7279\u6b8a\u5b57\u7b26\u7684\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u8ba8\u8bba\u4e86\u51e0\u79cd\u4f7f\u7528Python\u5199\u5165HTML\u6587\u4ef6\u6570\u636e\u7684\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528\u5185\u7f6e\u6587\u4ef6\u64cd\u4f5c\u51fd\u6570\u3001Jinja2\u6a21\u677f\u5e93\u3001BeautifulSoup\u5e93\u548cHTML\u5e93\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u4f18\u70b9\u548c\u9002\u7528\u573a\u666f\uff0c\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u9700\u6c42\u548c\u9879\u76ee\u7684\u590d\u6742\u7a0b\u5ea6\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528Python\u5185\u7f6e\u51fd\u6570\u8fdb\u884c\u5199\u5165\u9002\u5408\u7b80\u5355\u7684HTML\u751f\u6210\u4efb\u52a1\uff0c\u800c\u4f7f\u7528Jinja2\u6a21\u677f\u5e93\u5219\u9002\u5408\u9700\u8981\u5904\u7406\u590d\u6742\u6a21\u677f\u548c\u52a8\u6001\u5185\u5bb9\u7684\u573a\u666f\u3002BeautifulSoup\u5e93\u4e0d\u4ec5\u53ef\u4ee5\u7528\u6765\u89e3\u6790\u548c\u63d0\u53d6HTML\u5185\u5bb9\uff0c\u8fd8\u53ef\u4ee5\u7528\u6765\u751f\u6210\u548c\u4fee\u6539HTML\u5185\u5bb9\u3002<\/strong>\u6700\u7ec8\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u4f60\u7684\u5177\u4f53\u9700\u6c42\u548c\u504f\u597d\u3002<\/p>\n<\/p>\n<p><p>\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u9700\u8981\u786e\u4fdd\u751f\u6210\u7684HTML\u5185\u5bb9\u662f\u6709\u6548\u7684\uff0c\u5e76\u4e14\u7b26\u5408\u6807\u51c6\u7684HTML\u89c4\u8303\u3002\u8fd9\u4e0d\u4ec5\u6709\u52a9\u4e8e\u786e\u4fdd\u7f51\u9875\u5728\u5404\u79cd\u6d4f\u89c8\u5668\u4e2d\u7684\u6b63\u786e\u663e\u793a\uff0c\u8fd8\u53ef\u4ee5\u63d0\u9ad8\u7f51\u9875\u7684\u53ef\u8bbf\u95ee\u6027\u548c\u641c\u7d22\u5f15\u64ce\u4f18\u5316\uff08SEO\uff09\u6548\u679c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u521b\u5efa\u5e76\u5199\u5165\u4e00\u4e2a\u65b0\u7684HTML\u6587\u4ef6\uff1f<\/strong><br \/>\u521b\u5efa\u5e76\u5199\u5165\u4e00\u4e2a\u65b0\u7684HTML\u6587\u4ef6\u975e\u5e38\u7b80\u5355\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5185\u7f6e<code>open()<\/code>\u51fd\u6570\u6765\u521b\u5efa\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528<code>write()<\/code>\u65b9\u6cd5\u5c06HTML\u5185\u5bb9\u5199\u5165\u6587\u4ef6\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">html_content = &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;Hello, World!&lt;\/h1&gt;&lt;\/body&gt;&lt;\/html&gt;&quot;\nwith open(&quot;example.html&quot;, &quot;w&quot;) as file:\n    file.write(html_content)\n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>example.html<\/code>\u7684\u6587\u4ef6\uff0c\u5e76\u5728\u5176\u4e2d\u5199\u5165\u7b80\u5355\u7684HTML\u5185\u5bb9\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u52a8\u6001\u751f\u6210HTML\u5185\u5bb9\u5e76\u5199\u5165\u6587\u4ef6\uff1f<\/strong><br \/>\u52a8\u6001\u751f\u6210HTML\u5185\u5bb9\u901a\u5e38\u9700\u8981\u7ed3\u5408\u6570\u636e\u5904\u7406\u3002\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u6216\u6a21\u677f\u5f15\u64ce\uff08\u5982Jinja2\uff09\u6765\u63d2\u5165\u6570\u636e\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">name = &quot;John&quot;\nhtml_content = f&quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;Hello, {name}!&lt;\/h1&gt;&lt;\/body&gt;&lt;\/html&gt;&quot;\nwith open(&quot;dynamic_example.html&quot;, &quot;w&quot;) as file:\n    file.write(html_content)\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u6839\u636e\u53d8\u91cf\u7684\u503c\u751f\u6210\u4e0d\u540c\u7684HTML\u5185\u5bb9\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528\u5e93\u5199\u5165HTML\u6587\u4ef6\u4ee5\u589e\u5f3a\u529f\u80fd\uff1f<\/strong><br \/>\u4f7f\u7528\u5e93\u5982<code>BeautifulSoup<\/code>\u6216<code>lxml<\/code>\u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u521b\u5efa\u548c\u64cd\u4f5cHTML\u6587\u6863\u3002\u4f8b\u5982\uff0c<code>BeautifulSoup<\/code>\u53ef\u4ee5\u7528\u4e8e\u6784\u5efa\u66f4\u590d\u6742\u7684HTML\u7ed3\u6784\uff1a  <\/p>\n<pre><code class=\"language-python\">from bs4 import BeautifulSoup\n\nsoup = BeautifulSoup(&quot;&lt;html&gt;&lt;\/html&gt;&quot;, &quot;html.parser&quot;)\nbody = soup.new_tag(&quot;body&quot;)\nsoup.html.append(body)\nh1 = soup.new_tag(&quot;h1&quot;)\nh1.string = &quot;Hello, BeautifulSoup!&quot;\nbody.append(h1)\n\nwith open(&quot;soup_example.html&quot;, &quot;w&quot;) as file:\n    file.write(str(soup))\n<\/code><\/pre>\n<p>\u4f7f\u7528\u8fd9\u4e9b\u5e93\u53ef\u4ee5\u8ba9\u4f60\u66f4\u7075\u6d3b\u5730\u5904\u7406HTML\u6587\u6863\u7ed3\u6784\u548c\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u7528Python\u5199\u5165HTML\u6587\u4ef6\u6570\u636e\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u65b9\u6cd5\uff0c\u5982\u4f7f\u7528Python\u5185\u7f6e\u7684\u6587\u4ef6\u64cd\u4f5c\u51fd\u6570\u3001\u7ed3\u5408HTML\u6a21\u677f [&hellip;]","protected":false},"author":3,"featured_media":1094010,"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\/1094007"}],"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=1094007"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1094007\/revisions"}],"predecessor-version":[{"id":1094013,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1094007\/revisions\/1094013"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1094010"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1094007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1094007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1094007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}