{"id":1069317,"date":"2024-12-31T16:50:50","date_gmt":"2024-12-31T08:50:50","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1069317.html"},"modified":"2024-12-31T16:50:53","modified_gmt":"2024-12-31T08:50:53","slug":"python%e5%a6%82%e4%bd%95%e8%b0%83%e7%94%a8%e6%96%87%e4%bb%b6%e5%a4%b9%e5%86%85%e7%9a%84%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1069317.html","title":{"rendered":"python\u5982\u4f55\u8c03\u7528\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/5fa8eea5-52ac-4638-b5d0-ea085a1dc279.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u8c03\u7528\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6\" \/><\/p>\n<p><p> <strong>Python\u8c03\u7528\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6<\/strong>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff1a\u4f7f\u7528os\u6a21\u5757\u3001glob\u6a21\u5757\u3001pathlib\u6a21\u5757\u3002<strong>os\u6a21\u5757\u3001glob\u6a21\u5757\u3001pathlib\u6a21\u5757<\/strong>\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u4e00\u79cd\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><p>\u4f7f\u7528os\u6a21\u5757\uff1aos\u6a21\u5757\u662fPython\u6807\u51c6\u5e93\u4e2d\u7684\u4e00\u4e2a\u6a21\u5757\uff0c\u63d0\u4f9b\u4e86\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u4ea4\u4e92\u7684\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5bfc\u5165os\u6a21\u5757<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528os\u6a21\u5757\u4e4b\u524d\uff0c\u9700\u8981\u5148\u5bfc\u5165\u8be5\u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u83b7\u53d6\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6\u5217\u8868<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528os.listdir()\u51fd\u6570\u53ef\u4ee5\u83b7\u53d6\u6307\u5b9a\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u7684\u540d\u79f0\uff0c\u5e76\u4ee5\u5217\u8868\u7684\u5f62\u5f0f\u8fd4\u56de\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">folder_path = &#39;path\/to\/your\/folder&#39;<\/p>\n<p>files = os.listdir(folder_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u904d\u5386\u6587\u4ef6\u5217\u8868<\/h3>\n<\/p>\n<p><p>\u83b7\u53d6\u6587\u4ef6\u5217\u8868\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528for\u5faa\u73af\u904d\u5386\u8be5\u5217\u8868\uff0c\u9010\u4e2a\u5904\u7406\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for file in files:<\/p>\n<p>    file_path = os.path.join(folder_path, file)<\/p>\n<p>    # \u5728\u8fd9\u91cc\u53ef\u4ee5\u5bf9\u6bcf\u4e2a\u6587\u4ef6\u8fdb\u884c\u5904\u7406<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5224\u65ad\u6587\u4ef6\u7c7b\u578b<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u6587\u4ef6\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528os.path.isfile()\u548cos.path.isdir()\u51fd\u6570\u6765\u5224\u65ad\u6587\u4ef6\u7684\u7c7b\u578b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for file in files:<\/p>\n<p>    file_path = os.path.join(folder_path, file)<\/p>\n<p>    if os.path.isfile(file_path):<\/p>\n<p>        print(f&quot;{file_path} is a file&quot;)<\/p>\n<p>    elif os.path.isdir(file_path):<\/p>\n<p>        print(f&quot;{file_path} is a directory&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/h3>\n<\/p>\n<p><p>\u5728\u786e\u5b9a\u6587\u4ef6\u7c7b\u578b\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684open()\u51fd\u6570\u6765\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for file in files:<\/p>\n<p>    file_path = os.path.join(folder_path, file)<\/p>\n<p>    if os.path.isfile(file_path):<\/p>\n<p>        with open(file_path, &#39;r&#39;) as f:<\/p>\n<p>            content = f.read()<\/p>\n<p>            print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u793a\u4f8b\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u793a\u4f8b\u4ee3\u7801\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528os\u6a21\u5757\u8c03\u7528\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def read_files_in_folder(folder_path):<\/p>\n<p>    files = os.listdir(folder_path)<\/p>\n<p>    for file in files:<\/p>\n<p>        file_path = os.path.join(folder_path, file)<\/p>\n<p>        if os.path.isfile(file_path):<\/p>\n<p>            with open(file_path, &#39;r&#39;) as f:<\/p>\n<p>                content = f.read()<\/p>\n<p>                print(f&quot;Content of {file}:&quot;)<\/p>\n<p>                print(content)<\/p>\n<p>        elif os.path.isdir(file_path):<\/p>\n<p>            print(f&quot;{file_path} is a directory&quot;)<\/p>\n<h2><strong>\u8c03\u7528\u51fd\u6570\u8bfb\u53d6\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6<\/strong><\/h2>\n<p>folder_path = &#39;path\/to\/your\/folder&#39;<\/p>\n<p>read_files_in_folder(folder_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u4f7f\u7528glob\u6a21\u5757<\/h3>\n<\/p>\n<p><p>glob\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u4e2a\u51fd\u6570glob.glob()\uff0c\u53ef\u4ee5\u4f7f\u7528\u901a\u914d\u7b26\u6765\u5339\u914d\u6587\u4ef6\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import glob<\/p>\n<p>folder_path = &#39;path\/to\/your\/folder&#39;<\/p>\n<p>file_paths = glob.glob(os.path.join(folder_path, &#39;*&#39;))<\/p>\n<p>for file_path in file_paths:<\/p>\n<p>    if os.path.isfile(file_path):<\/p>\n<p>        with open(file_path, &#39;r&#39;) as f:<\/p>\n<p>            content = f.read()<\/p>\n<p>            print(f&quot;Content of {file_path}:&quot;)<\/p>\n<p>            print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u4f7f\u7528pathlib\u6a21\u5757<\/h3>\n<\/p>\n<p><p>pathlib\u6a21\u5757\u63d0\u4f9b\u4e86\u9762\u5411\u5bf9\u8c61\u7684\u8def\u5f84\u64cd\u4f5c\uff0c\u53ef\u4ee5\u4f7f\u7528Path\u7c7b\u6765\u5904\u7406\u6587\u4ef6\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>folder_path = Path(&#39;path\/to\/your\/folder&#39;)<\/p>\n<p>for file_path in folder_path.iterdir():<\/p>\n<p>    if file_path.is_file():<\/p>\n<p>        with file_path.open(&#39;r&#39;) as f:<\/p>\n<p>            content = f.read()<\/p>\n<p>            print(f&quot;Content of {file_path}:&quot;)<\/p>\n<p>            print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6587\u4ef6\u5939\u5185\u53ef\u80fd\u5305\u542b\u4e0d\u540c\u7c7b\u578b\u7684\u6587\u4ef6\uff0c\u53ef\u4ee5\u6839\u636e\u6587\u4ef6\u6269\u5c55\u540d\u6765\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def read_files_in_folder(folder_path):<\/p>\n<p>    files = os.listdir(folder_path)<\/p>\n<p>    for file in files:<\/p>\n<p>        file_path = os.path.join(folder_path, file)<\/p>\n<p>        if os.path.isfile(file_path):<\/p>\n<p>            file_extension = os.path.splitext(file_path)[1]<\/p>\n<p>            if file_extension == &#39;.txt&#39;:<\/p>\n<p>                with open(file_path, &#39;r&#39;) as f:<\/p>\n<p>                    content = f.read()<\/p>\n<p>                    print(f&quot;Content of {file}:&quot;)<\/p>\n<p>                    print(content)<\/p>\n<p>            elif file_extension == &#39;.csv&#39;:<\/p>\n<p>                with open(file_path, &#39;r&#39;) as f:<\/p>\n<p>                    content = f.readlines()<\/p>\n<p>                    print(f&quot;Content of {file}:&quot;)<\/p>\n<p>                    print(content)<\/p>\n<p>            # \u53ef\u4ee5\u6839\u636e\u9700\u8981\u6dfb\u52a0\u66f4\u591a\u7684\u6587\u4ef6\u7c7b\u578b\u5904\u7406\u903b\u8f91<\/p>\n<p>        elif os.path.isdir(file_path):<\/p>\n<p>            print(f&quot;{file_path} is a directory&quot;)<\/p>\n<h2><strong>\u8c03\u7528\u51fd\u6570\u8bfb\u53d6\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6<\/strong><\/h2>\n<p>folder_path = &#39;path\/to\/your\/folder&#39;<\/p>\n<p>read_files_in_folder(folder_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u5341\u3001\u9012\u5f52\u904d\u5386\u6587\u4ef6\u5939<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6587\u4ef6\u5939\u5185\u53ef\u80fd\u5305\u542b\u5b50\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u4f7f\u7528\u9012\u5f52\u904d\u5386\u7684\u65b9\u5f0f\u5904\u7406\u6240\u6709\u6587\u4ef6\u548c\u6587\u4ef6\u5939\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def read_files_in_folder(folder_path):<\/p>\n<p>    files = os.listdir(folder_path)<\/p>\n<p>    for file in files:<\/p>\n<p>        file_path = os.path.join(folder_path, file)<\/p>\n<p>        if os.path.isfile(file_path):<\/p>\n<p>            with open(file_path, &#39;r&#39;) as f:<\/p>\n<p>                content = f.read()<\/p>\n<p>                print(f&quot;Content of {file}:&quot;)<\/p>\n<p>                print(content)<\/p>\n<p>        elif os.path.isdir(file_path):<\/p>\n<p>            print(f&quot;{file_path} is a directory&quot;)<\/p>\n<p>            # \u9012\u5f52\u8c03\u7528\u5904\u7406\u5b50\u6587\u4ef6\u5939<\/p>\n<p>            read_files_in_folder(file_path)<\/p>\n<h2><strong>\u8c03\u7528\u51fd\u6570\u8bfb\u53d6\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6<\/strong><\/h2>\n<p>folder_path = &#39;path\/to\/your\/folder&#39;<\/p>\n<p>read_files_in_folder(folder_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u5341\u4e00\u3001\u4f7f\u7528\u5f02\u5e38\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u8bfb\u53d6\u6587\u4ef6\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u6587\u4ef6\u4e0d\u5b58\u5728\u3001\u6743\u9650\u4e0d\u8db3\u7b49\u5f02\u5e38\u60c5\u51b5\uff0c\u53ef\u4ee5\u4f7f\u7528try-except\u8bed\u53e5\u8fdb\u884c\u5f02\u5e38\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def read_files_in_folder(folder_path):<\/p>\n<p>    try:<\/p>\n<p>        files = os.listdir(folder_path)<\/p>\n<p>        for file in files:<\/p>\n<p>            file_path = os.path.join(folder_path, file)<\/p>\n<p>            if os.path.isfile(file_path):<\/p>\n<p>                try:<\/p>\n<p>                    with open(file_path, &#39;r&#39;) as f:<\/p>\n<p>                        content = f.read()<\/p>\n<p>                        print(f&quot;Content of {file}:&quot;)<\/p>\n<p>                        print(content)<\/p>\n<p>                except Exception as e:<\/p>\n<p>                    print(f&quot;Error reading file {file}: {e}&quot;)<\/p>\n<p>            elif os.path.isdir(file_path):<\/p>\n<p>                print(f&quot;{file_path} is a directory&quot;)<\/p>\n<p>                # \u9012\u5f52\u8c03\u7528\u5904\u7406\u5b50\u6587\u4ef6\u5939<\/p>\n<p>                read_files_in_folder(file_path)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        print(f&quot;Error reading folder {folder_path}: {e}&quot;)<\/p>\n<h2><strong>\u8c03\u7528\u51fd\u6570\u8bfb\u53d6\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6<\/strong><\/h2>\n<p>folder_path = &#39;path\/to\/your\/folder&#39;<\/p>\n<p>read_files_in_folder(folder_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u5341\u4e8c\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u51e0\u79cd\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728Python\u4e2d\u65b9\u4fbf\u5730\u8c03\u7528\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6\u3002os\u6a21\u5757\u3001glob\u6a21\u5757\u548cpathlib\u6a21\u5757\u5404\u6709\u4f18\u52a3\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8fd8\u53ef\u4ee5\u7ed3\u5408\u6587\u4ef6\u7c7b\u578b\u5904\u7406\u3001\u9012\u5f52\u904d\u5386\u548c\u5f02\u5e38\u5904\u7406\u7b49\u6280\u672f\uff0c\u5904\u7406\u590d\u6742\u7684\u6587\u4ef6\u64cd\u4f5c\u4efb\u52a1\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u83b7\u53d6\u7279\u5b9a\u6587\u4ef6\u5939\u5185\u7684\u6240\u6709\u6587\u4ef6\u540d\uff1f<\/strong><br \/>\u8981\u83b7\u53d6\u7279\u5b9a\u6587\u4ef6\u5939\u5185\u7684\u6240\u6709\u6587\u4ef6\u540d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u4e2d\u7684<code>listdir()<\/code>\u51fd\u6570\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">import os\n\nfolder_path = &#39;\u4f60\u7684\u6587\u4ef6\u5939\u8def\u5f84&#39;\nfiles = os.listdir(folder_path)\nprint(files)\n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u8fd4\u56de\u6307\u5b9a\u6587\u4ef6\u5939\u5185\u7684\u6240\u6709\u6587\u4ef6\u548c\u5b50\u6587\u4ef6\u5939\u7684\u540d\u79f0\u3002\u5982\u679c\u53ea\u60f3\u83b7\u53d6\u6587\u4ef6\uff0c\u53ef\u4ee5\u7ed3\u5408<code>os.path<\/code>\u6a21\u5757\u6765\u7b5b\u9009\u3002<\/p>\n<p><strong>Python\u5982\u4f55\u8bfb\u53d6\u6587\u4ef6\u5939\u5185\u7279\u5b9a\u7c7b\u578b\u7684\u6587\u4ef6\uff1f<\/strong><br \/>\u5982\u679c\u4f60\u53ea\u60f3\u8bfb\u53d6\u7279\u5b9a\u7c7b\u578b\u7684\u6587\u4ef6\uff0c\u6bd4\u5982<code>.txt<\/code>\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>glob<\/code>\u6a21\u5757\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python\">import glob\n\nfolder_path = &#39;\u4f60\u7684\u6587\u4ef6\u5939\u8def\u5f84\/*.txt&#39;\ntxt_files = glob.glob(folder_path)\nprint(txt_files)\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u83b7\u5f97\u6587\u4ef6\u5939\u4e2d\u6240\u6709\u4ee5<code>.txt<\/code>\u7ed3\u5c3e\u7684\u6587\u4ef6\u5217\u8868\uff0c\u65b9\u4fbf\u540e\u7eed\u5904\u7406\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u6253\u5f00\u5e76\u8bfb\u53d6\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6\u5185\u5bb9\uff1f<\/strong><br \/>\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u53ef\u4ee5\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u3002\u5047\u8bbe\u4f60\u5df2\u7ecf\u83b7\u53d6\u4e86\u6587\u4ef6\u540d\u5217\u8868\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8bfb\u53d6\u5185\u5bb9\uff1a<\/p>\n<pre><code class=\"language-python\">for file in files:\n    with open(os.path.join(folder_path, file), &#39;r&#39;) as f:\n        content = f.read()\n        print(content)\n<\/code><\/pre>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u6253\u5f00\u6bcf\u4e2a\u6587\u4ef6\u5e76\u6253\u5370\u5176\u5185\u5bb9\u3002\u786e\u4fdd\u5728\u8bfb\u53d6\u6587\u4ef6\u524d\u68c0\u67e5\u6587\u4ef6\u7c7b\u578b\uff0c\u4ee5\u907f\u514d\u8bfb\u53d6\u975e\u6587\u672c\u6587\u4ef6\u5bfc\u81f4\u7684\u9519\u8bef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u8c03\u7528\u6587\u4ef6\u5939\u5185\u7684\u6587\u4ef6\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff1a\u4f7f\u7528os\u6a21\u5757\u3001glob\u6a21\u5757\u3001pathlib\u6a21\u5757\u3002os\u6a21 [&hellip;]","protected":false},"author":3,"featured_media":1069319,"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\/1069317"}],"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=1069317"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1069317\/revisions"}],"predecessor-version":[{"id":1069320,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1069317\/revisions\/1069320"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1069319"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1069317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1069317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1069317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}