{"id":6707,"date":"2025-12-06T10:24:16","date_gmt":"2025-12-06T02:24:16","guid":{"rendered":"http:\/\/192.168.1.29\/?p=6707"},"modified":"2025-12-06T10:39:34","modified_gmt":"2025-12-06T02:39:34","slug":"pdf%e6%96%87%e4%bb%b6%e5%a4%84%e7%90%86python%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"http:\/\/xc.ipyingshe.net:5347\/?p=6707","title":{"rendered":"pdf\u6587\u4ef6\u5904\u7406python\u4ee3\u7801"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">1. \u5b8c\u6574\u7684PDF\u5904\u7406\u4ee3\u7801<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/usr\/bin\/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nPDF\u5904\u7406\u5de5\u5177 - \u4f7f\u7528pdfplumber\u63d0\u53d6PDF\u5185\u5bb9\n\n\u529f\u80fd\u7279\u6027\uff1a\n1. \u63d0\u53d6\u6240\u6709\u6587\u672c\u6216\u6307\u5b9a\u9875\u9762\u6587\u672c\n2. \u63d0\u53d6\u8868\u683c\u5e76\u5bfc\u51fa\u4e3aCSV\/Excel\n3. \u63d0\u53d6PDF\u5143\u6570\u636e\n4. \u63d0\u53d6\u5e76\u4fdd\u5b58\u56fe\u7247\n5. \u652f\u6301\u81ea\u5b9a\u4e49\u6587\u672c\u63d0\u53d6\u53c2\u6570\n6. \u81ea\u52a8\u5904\u7406FontBBox\u9519\u8bef\n\n\u5b89\u88c5\u4f9d\u8d56\uff1a\npip install pdfplumber pillow pandas openpyxl\n\"\"\"\n\nimport pdfplumber\nfrom PIL import Image\nimport pandas as pd\nimport logging\nimport warnings\nimport os\nimport argparse\nfrom datetime import datetime\n\n# \u914d\u7f6e\u65e5\u5fd7\u548c\u8b66\u544a\u6291\u5236\nlogging.basicConfig(level=logging.ERROR)\nwarnings.filterwarnings('ignore')\nlogging.getLogger('pdfplumber').setLevel(logging.CRITICAL)\nlogging.getLogger('pdfminer').setLevel(logging.CRITICAL)\nlogging.getLogger('PIL').setLevel(logging.CRITICAL)\n\n\nclass PDFProcessor:\n    \"\"\"PDF\u5904\u7406\u7c7b\"\"\"\n    \n    def __init__(self, pdf_path, laparams=None):\n        \"\"\"\u521d\u59cb\u5316PDF\u5904\u7406\u5668\"\"\"\n        self.pdf_path = pdf_path\n        self.laparams = laparams or {\n            \"detect_vertical\": False,\n            \"line_overlap\": 0.5,\n            \"char_margin\": 2.0,\n            \"word_margin\": 0.1,\n            \"line_margin\": 0.5,\n            \"boxes_flow\": 0.5\n        }\n        self.pdf = None\n        self.pages = &#91;]\n        self.output_dir = \"pdf_output\"\n        \n        # \u521b\u5efa\u8f93\u51fa\u76ee\u5f55\n        os.makedirs(self.output_dir, exist_ok=True)\n        \n    def open_pdf(self):\n        \"\"\"\u6253\u5f00PDF\u6587\u4ef6\"\"\"\n        try:\n            self.pdf = pdfplumber.open(self.pdf_path, laparams=self.laparams)\n            self.pages = self.pdf.pages\n            print(f\"\u2713 \u6210\u529f\u6253\u5f00PDF: {os.path.basename(self.pdf_path)}\")\n            print(f\"  \u603b\u9875\u6570: {len(self.pages)}\")\n            return True\n        except Exception as e:\n            print(f\"\u2717 \u65e0\u6cd5\u6253\u5f00PDF: {e}\")\n            return False\n    \n    def close_pdf(self):\n        \"\"\"\u5173\u95edPDF\u6587\u4ef6\"\"\"\n        if self.pdf:\n            self.pdf.close()\n            print(f\"\u2713 \u5df2\u5173\u95edPDF\u6587\u4ef6\")\n    \n    def extract_metadata(self):\n        \"\"\"\u63d0\u53d6PDF\u5143\u6570\u636e\"\"\"\n        if not self.pdf:\n            print(\"\u2717 PDF\u672a\u6253\u5f00\")\n            return None\n        \n        try:\n            metadata = self.pdf.metadata\n            print(\"\\n? PDF\u5143\u6570\u636e:\")\n            for key, value in metadata.items():\n                if value:\n                    print(f\"  {key}: {value}\")\n            return metadata\n        except Exception as e:\n            print(f\"\u2717 \u63d0\u53d6\u5143\u6570\u636e\u5931\u8d25: {e}\")\n            return None\n    \n    def extract_text(self, page_numbers=None, max_chars=1000):\n        \"\"\"\u63d0\u53d6\u6587\u672c\u5185\u5bb9\"\"\"\n        if not self.pages:\n            print(\"\u2717 \u6ca1\u6709\u53ef\u5904\u7406\u7684\u9875\u9762\")\n            return \"\"\n        \n        all_text = \"\"\n        pages_to_process = page_numbers or range(len(self.pages))\n        \n        print(\"\\n? \u6b63\u5728\u63d0\u53d6\u6587\u672c...\")\n        for idx in pages_to_process:\n            if 0 &lt;= idx &lt; len(self.pages):\n                try:\n                    page = self.pages&#91;idx]\n                    page_text = self._safe_extract_text(page)\n                    \n                    if page_text:\n                        page_num = idx + 1\n                        all_text += f\"\\n=== \u7b2c {page_num} \u9875 ===\\n\"\n                        all_text += page_text + \"\\n\"\n                        print(f\"  \u2713 \u7b2c {page_num} \u9875: {len(page_text)} \u5b57\u7b26\")\n                    else:\n                        print(f\"  ? \u7b2c {idx + 1} \u9875: \u65e0\u6587\u672c\")\n                except Exception as e:\n                    print(f\"  \u2717 \u7b2c {idx + 1} \u9875: \u9519\u8bef - {e}\")\n            else:\n                print(f\"  \u26a0 \u7b2c {idx + 1} \u9875: \u9875\u9762\u4e0d\u5b58\u5728\")\n        \n        if all_text:\n            print(f\"\\n? \u6587\u672c\u63d0\u53d6\u7edf\u8ba1:\")\n            print(f\"  \u603b\u5b57\u7b26\u6570: {len(all_text)}\")\n            if max_chars &gt; 0:\n                print(f\"\\n? \u63d0\u53d6\u7684\u6587\u672c\u9884\u89c8 ({max_chars} \u5b57\u7b26):\")\n                print(all_text&#91;:max_chars] + \"...\")\n            \n            # \u4fdd\u5b58\u5b8c\u6574\u6587\u672c\u5230\u6587\u4ef6\n            text_file = os.path.join(self.output_dir, \"extracted_text.txt\")\n            with open(text_file, \"w\", encoding=\"utf-8\") as f:\n                f.write(all_text)\n            print(f\"\\n\u2713 \u5b8c\u6574\u6587\u672c\u5df2\u4fdd\u5b58\u5230: {text_file}\")\n        \n        return all_text\n    \n    def extract_tables(self, page_numbers=None, export_to_csv=True):\n        \"\"\"\u63d0\u53d6\u8868\u683c\u5185\u5bb9\"\"\"\n        if not self.pages:\n            print(\"\u2717 \u6ca1\u6709\u53ef\u5904\u7406\u7684\u9875\u9762\")\n            return &#91;]\n        \n        all_tables = &#91;]\n        pages_to_process = page_numbers or range(len(self.pages))\n        table_count = 0\n        \n        print(\"\\n? \u6b63\u5728\u63d0\u53d6\u8868\u683c...\")\n        for idx in pages_to_process:\n            if 0 &lt;= idx &lt; len(self.pages):\n                try:\n                    page = self.pages&#91;idx]\n                    tables = page.extract_tables()\n                    \n                    if tables:\n                        page_num = idx + 1\n                        print(f\"\\n--- \u7b2c {page_num} \u9875 \u8868\u683c ---\")\n                        \n                        for table_idx, table in enumerate(tables):\n                            table_count += 1\n                            print(f\"  \u8868\u683c {table_idx + 1}:\")\n                            print(f\"    \u884c\u6570: {len(table)}, \u5217\u6570: {len(table&#91;0]) if table else 0}\")\n                            \n                            # \u663e\u793a\u8868\u683c\u524d3\u884c\n                            for i, row in enumerate(table&#91;:3]):\n                                cleaned_row = &#91;cell if cell else \"\" for cell in row]\n                                print(f\"    {cleaned_row}\")\n                            if len(table) &gt; 3:\n                                print(f\"    ... (\u5171 {len(table)} \u884c)\")\n                            \n                            all_tables.append((page_num, table_idx + 1, table))\n                            \n                            # \u5bfc\u51fa\u8868\u683c\u5230CSV\n                            if export_to_csv and table:\n                                try:\n                                    csv_file = os.path.join(self.output_dir, f\"table_page{page_num}_{table_idx + 1}.csv\")\n                                    df = pd.DataFrame(table&#91;1:], columns=table&#91;0] if len(table) &gt; 1 else &#91;f\"\u5217{i+1}\" for i in range(len(table&#91;0]))])\n                                    df.to_csv(csv_file, index=False, encoding=\"utf-8-sig\")\n                                    print(f\"    \u2713 \u5df2\u5bfc\u51fa\u5230: {csv_file}\")\n                                except Exception as e:\n                                    print(f\"    \u2717 \u5bfc\u51fa\u5931\u8d25: {e}\")\n                    else:\n                        print(f\"  ? \u7b2c {idx + 1} \u9875: \u65e0\u8868\u683c\")\n                except Exception as e:\n                    print(f\"  \u2717 \u7b2c {idx + 1} \u9875: \u9519\u8bef - {e}\")\n        \n        print(f\"\\n? \u8868\u683c\u63d0\u53d6\u7edf\u8ba1:\")\n        print(f\"  \u603b\u8868\u683c\u6570: {table_count}\")\n        return all_tables\n    \n    def extract_images(self, page_numbers=None):\n        \"\"\"\u63d0\u53d6\u56fe\u7247\u5185\u5bb9\"\"\"\n        if not self.pages:\n            print(\"\u2717 \u6ca1\u6709\u53ef\u5904\u7406\u7684\u9875\u9762\")\n            return 0\n        \n        image_count = 0\n        pages_to_process = page_numbers or range(len(self.pages))\n        \n        print(\"\\n?\ufe0f  \u6b63\u5728\u63d0\u53d6\u56fe\u7247...\")\n        for idx in pages_to_process:\n            if 0 &lt;= idx &lt; len(self.pages):\n                try:\n                    page = self.pages&#91;idx]\n                    images = page.images\n                    \n                    if images:\n                        page_num = idx + 1\n                        print(f\"\\n--- \u7b2c {page_num} \u9875 \u56fe\u7247 ---\")\n                        \n                        for img_idx, img in enumerate(images):\n                            image_count += 1\n                            print(f\"  \u56fe\u7247 {img_idx + 1}:\")\n                            print(f\"    \u4f4d\u7f6e: {img&#91;'bbox']}\")\n                            print(f\"    \u5c3a\u5bf8: {img&#91;'width']}x{img&#91;'height']}\")\n                            \n                            if 'stream' in img:\n                                try:\n                                    pil_img = Image.open(img&#91;'stream'])\n                                    img_file = os.path.join(self.output_dir, f\"image_page{page_num}_{img_idx + 1}.png\")\n                                    pil_img.save(img_file)\n                                    print(f\"    \u2713 \u5df2\u4fdd\u5b58\u5230: {img_file}\")\n                                except Exception as e:\n                                    print(f\"    \u2717 \u4fdd\u5b58\u5931\u8d25: {e}\")\n                    else:\n                        print(f\"  ? \u7b2c {idx + 1} \u9875: \u65e0\u56fe\u7247\")\n                except Exception as e:\n                    print(f\"  \u2717 \u7b2c {idx + 1} \u9875: \u9519\u8bef - {e}\")\n        \n        print(f\"\\n? \u56fe\u7247\u63d0\u53d6\u7edf\u8ba1:\")\n        print(f\"  \u603b\u56fe\u7247\u6570: {image_count}\")\n        return image_count\n    \n    def _safe_extract_text(self, page):\n        \"\"\"\u5b89\u5168\u63d0\u53d6\u6587\u672c\uff0c\u5904\u7406FontBBox\u9519\u8bef\"\"\"\n        try:\n            return page.extract_text()\n        except Exception:\n            # \u5931\u8d25\u65f6\u5c1d\u8bd5\u7b80\u5316\u53c2\u6570\n            try:\n                return page.extract_text(x_tolerance=3, y_tolerance=3)\n            except Exception:\n                return None\n    \n    def batch_process(self, extract_text=True, extract_tables=True, extract_images=True, page_numbers=None):\n        \"\"\"\u6279\u91cf\u5904\u7406PDF\"\"\"\n        start_time = datetime.now()\n        print(f\"\\n? \u5f00\u59cb\u6279\u91cf\u5904\u7406 - {start_time.strftime('%H:%M:%S')}\")\n        print(f\"  \u8f93\u51fa\u76ee\u5f55: {self.output_dir}\")\n        \n        if not self.open_pdf():\n            return False\n        \n        try:\n            # \u63d0\u53d6\u5143\u6570\u636e\n            self.extract_metadata()\n            \n            # \u63d0\u53d6\u6587\u672c\n            if extract_text:\n                self.extract_text(page_numbers)\n            \n            # \u63d0\u53d6\u8868\u683c\n            if extract_tables:\n                self.extract_tables(page_numbers)\n            \n            # \u63d0\u53d6\u56fe\u7247\n            if extract_images:\n                self.extract_images(page_numbers)\n            \n            end_time = datetime.now()\n            duration = (end_time - start_time).total_seconds()\n            print(f\"\\n? \u5904\u7406\u5b8c\u6210 - \u8017\u65f6: {duration:.2f} \u79d2\")\n            print(f\"? \u6240\u6709\u6587\u4ef6\u5df2\u4fdd\u5b58\u5230: {self.output_dir}\")\n            return True\n            \n        finally:\n            self.close_pdf()\n\n\ndef parse_arguments():\n    \"\"\"\u89e3\u6790\u547d\u4ee4\u884c\u53c2\u6570\"\"\"\n    parser = argparse.ArgumentParser(description='PDF\u5185\u5bb9\u63d0\u53d6\u5de5\u5177')\n    parser.add_argument('pdf_path', nargs='?', default=r'c:\\Users\\czliu\\Documents\\python\\\u6162\u6162\u53d8\u5bcc.pdf',\n                        help='PDF\u6587\u4ef6\u8def\u5f84')\n    parser.add_argument('--text', action='store_true', help='\u4ec5\u63d0\u53d6\u6587\u672c')\n    parser.add_argument('--tables', action='store_true', help='\u4ec5\u63d0\u53d6\u8868\u683c')\n    parser.add_argument('--images', action='store_true', help='\u4ec5\u63d0\u53d6\u56fe\u7247')\n    parser.add_argument('--pages', type=str, help='\u6307\u5b9a\u9875\u9762\u8303\u56f4 (\u4f8b\u5982: 1-5,7,9-10)')\n    parser.add_argument('--all', action='store_true', help='\u63d0\u53d6\u6240\u6709\u5185\u5bb9 (\u9ed8\u8ba4)')\n    return parser.parse_args()\n\n\ndef parse_page_numbers(page_str, total_pages):\n    \"\"\"\u89e3\u6790\u9875\u9762\u8303\u56f4\u5b57\u7b26\u4e32\"\"\"\n    if not page_str:\n        return None\n    \n    page_numbers = &#91;]\n    parts = page_str.split(',')\n    \n    for part in parts:\n        part = part.strip()\n        if '-' in part:\n            start, end = part.split('-')\n            try:\n                start = int(start.strip())\n                end = int(end.strip())\n                page_numbers.extend(range(start-1, min(end, total_pages)))\n            except ValueError:\n                print(f\"\u26a0 \u65e0\u6548\u7684\u9875\u9762\u8303\u56f4: {part}\")\n        else:\n            try:\n                page = int(part.strip())\n                if 1 &lt;= page &lt;= total_pages:\n                    page_numbers.append(page-1)\n            except ValueError:\n                print(f\"\u26a0 \u65e0\u6548\u7684\u9875\u7801: {part}\")\n    \n    return sorted(list(set(page_numbers)))\n\n\nif __name__ == \"__main__\":\n    \"\"\"\u4e3b\u51fd\u6570\"\"\"\n    args = parse_arguments()\n    \n    # \u786e\u5b9a\u8981\u63d0\u53d6\u7684\u5185\u5bb9\n    extract_text = args.text or args.all or not (args.tables or args.images)\n    extract_tables = args.tables or args.all or not (args.text or args.images)\n    extract_images = args.images or args.all or not (args.text or args.tables)\n    \n    # \u5904\u7406PDF\n    processor = PDFProcessor(args.pdf_path)\n    \n    # \u89e3\u6790\u9875\u9762\u8303\u56f4\n    page_numbers = None\n    if args.pages:\n        # \u5148\u6253\u5f00PDF\u83b7\u53d6\u603b\u9875\u6570\n        if processor.open_pdf():\n            page_numbers = parse_page_numbers(args.pages, len(processor.pages))\n            processor.close_pdf()\n            \n    # \u6267\u884c\u6279\u91cf\u5904\u7406\n    processor.batch_process(\n        extract_text=extract_text,\n        extract_tables=extract_tables,\n        extract_images=extract_images,\n        page_numbers=page_numbers\n    )\n    \n    print(\"\\n? \u4f7f\u7528\u5e2e\u52a9:\")\n    print(\"  python treat_pdf_file.py --text            # \u4ec5\u63d0\u53d6\u6587\u672c\")\n    print(\"  python treat_pdf_file.py --tables          # \u4ec5\u63d0\u53d6\u8868\u683c\")\n    print(\"  python treat_pdf_file.py --images          # \u4ec5\u63d0\u53d6\u56fe\u7247\")\n    print(\"  python treat_pdf_file.py --pages 1-5       # \u63d0\u53d6\u6307\u5b9a\u9875\u9762\")\n    print(\"  python treat_pdf_file.py your_file.pdf     # \u5904\u7406\u6307\u5b9aPDF\")\n    print(\"  python treat_pdf_file.py your_file.pdf --all  # \u63d0\u53d6\u6240\u6709\u5185\u5bb9\")\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>### 2. \u4f7f\u7528\u8bf4\u660e\n\n1. **\u5b89\u88c5\u4f9d\u8d56**\uff1a<\/code><\/pre>\n\n\n\n<p>bash<br>pip install pdfplumber pillow pandas openpyxl<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>2. **\u8fd0\u884c\u7a0b\u5e8f**\uff1a<\/code><\/pre>\n\n\n\n<p>bash<br>python treat_pdf_file.py<br>&#8220;`<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>\u547d\u4ee4\u884c\u9009\u9879<\/strong>\uff1a<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>--text<\/code> &#8211; \u4ec5\u63d0\u53d6\u6587\u672c<\/li>\n\n\n\n<li><code>--tables<\/code> &#8211; \u4ec5\u63d0\u53d6\u8868\u683c<\/li>\n\n\n\n<li><code>--images<\/code> &#8211; \u4ec5\u63d0\u53d6\u56fe\u7247<\/li>\n\n\n\n<li><code>--pages<\/code> &#8211; \u6307\u5b9a\u9875\u9762\u8303\u56f4\uff08\u4f8b\u5982\uff1a<code>1-5<\/code>\u3001<code>1,3,5<\/code>\uff09<\/li>\n\n\n\n<li><code>--all<\/code> &#8211; \u63d0\u53d6\u6240\u6709\u5185\u5bb9\uff08\u9ed8\u8ba4\uff09<\/li>\n<\/ul>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>\u8f93\u51fa\u7ed3\u679c<\/strong>\uff1a<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6240\u6709\u63d0\u53d6\u7684\u5185\u5bb9\u5c06\u4fdd\u5b58\u5728 <code>pdf_output<\/code> \u6587\u4ef6\u5939\u4e2d<\/li>\n\n\n\n<li>\u6587\u672c\u4fdd\u5b58\u5728 <code>extracted_text.txt<\/code><\/li>\n\n\n\n<li>\u8868\u683c\u4fdd\u5b58\u5728 <code>table_pageX_Y.csv<\/code><\/li>\n\n\n\n<li>\u56fe\u7247\u4fdd\u5b58\u5728 <code>image_pageX_Y.png<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u4e3b\u8981\u529f\u80fd\u6539\u8fdb<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5b8c\u6574\u7684\u9762\u5411\u5bf9\u8c61\u8bbe\u8ba1<\/strong>\uff1a\u4f7f\u7528 <code>PDFProcessor<\/code> \u7c7b\u5c01\u88c5\u6240\u6709\u529f\u80fd<\/li>\n\n\n\n<li><strong>\u547d\u4ee4\u884c\u754c\u9762<\/strong>\uff1a\u652f\u6301\u7075\u6d3b\u7684\u53c2\u6570\u63a7\u5236<\/li>\n\n\n\n<li><strong>\u667a\u80fd\u9519\u8bef\u5904\u7406<\/strong>\uff1a\u81ea\u52a8\u5904\u7406FontBBox\u7b49\u5e38\u89c1PDF\u9519\u8bef<\/li>\n\n\n\n<li><strong>\u8b66\u544a\u6291\u5236<\/strong>\uff1a\u901a\u8fc7\u65e5\u5fd7\u914d\u7f6e\u6d88\u9664\u70e6\u4eba\u7684\u8b66\u544a\u4fe1\u606f<\/li>\n\n\n\n<li><strong>\u8f93\u51fa\u7ba1\u7406<\/strong>\uff1a\u7edf\u4e00\u4fdd\u5b58\u5230 <code>pdf_output<\/code> \u76ee\u5f55<\/li>\n\n\n\n<li><strong>\u8be6\u7ec6\u53cd\u9988<\/strong>\uff1a\u5b9e\u65f6\u663e\u793a\u5904\u7406\u8fdb\u5ea6\u548c\u7ed3\u679c<\/li>\n\n\n\n<li><strong>\u5b89\u5168\u63d0\u53d6<\/strong>\uff1a\u5b9e\u73b0\u4e86\u5907\u7528\u6587\u672c\u63d0\u53d6\u673a\u5236<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5b8c\u6574\u7684PDF\u5904\u7406\u4ee3\u7801 bashpip install pdfplumber <span class=\"readmore\"><a href=\"http:\/\/xc.ipyingshe.net:5347\/?p=6707\">Continue Reading<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-6707","post","type-post","status-publish","format-standard","hentry","category-2"],"_links":{"self":[{"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/6707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6707"}],"version-history":[{"count":3,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/6707\/revisions"}],"predecessor-version":[{"id":6711,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/6707\/revisions\/6711"}],"wp:attachment":[{"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6707"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xc.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}