{"id":977565,"date":"2024-12-27T06:30:38","date_gmt":"2024-12-26T22:30:38","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/977565.html"},"modified":"2024-12-27T06:30:40","modified_gmt":"2024-12-26T22:30:40","slug":"%e5%a6%82%e4%bd%95%e6%9f%a5%e7%9c%8bpython%e7%88%ac%e8%99%ab%e6%9d%83%e9%99%90","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/977565.html","title":{"rendered":"\u5982\u4f55\u67e5\u770bpython\u722c\u866b\u6743\u9650"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24202850\/760e55b8-fd73-4a02-af39-3e5ad323bd7a.webp\" alt=\"\u5982\u4f55\u67e5\u770bpython\u722c\u866b\u6743\u9650\" \/><\/p>\n<p><p> <strong>\u67e5\u770bPython\u722c\u866b\u6743\u9650\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u7f51\u7ad9\u7684robots.txt\u6587\u4ef6\u3001\u4f7f\u7528\u8bf7\u6c42\u5934\u6a21\u62df\u6b63\u5e38\u6d4f\u89c8\u5668\u8bbf\u95ee\u3001\u4ee5\u53ca\u9075\u5faa\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\u6765\u5b9e\u73b0<\/strong>\u3002\u9996\u5148\uff0c\u68c0\u67e5robots.txt\u6587\u4ef6\u662f\u4e86\u89e3\u7f51\u7ad9\u722c\u866b\u89c4\u5219\u7684\u57fa\u7840\uff0c\u56e0\u4e3a\u6b64\u6587\u4ef6\u89c4\u5b9a\u4e86\u54ea\u4e9b\u90e8\u5206\u5141\u8bb8\u88ab\u722c\u53d6\u3002\u5176\u6b21\uff0c\u4f7f\u7528\u8bf7\u6c42\u5934\u6a21\u62df\u6b63\u5e38\u7684\u6d4f\u89c8\u5668\u8bbf\u95ee\u53ef\u4ee5\u5e2e\u52a9\u4f60\u907f\u514d\u88ab\u8bc6\u522b\u4e3a\u722c\u866b\uff0c\u5e76\u4e86\u89e3\u7f51\u7ad9\u662f\u5426\u6709\u53cd\u722c\u866b\u673a\u5236\u3002\u6700\u540e\uff0c\u9075\u5faa\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\u548c\u6cd5\u5f8b\u89c4\u5b9a\u53ef\u4ee5\u786e\u4fdd\u722c\u866b\u6d3b\u52a8\u7684\u5408\u6cd5\u6027\u548c\u9053\u5fb7\u6027\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u68c0\u67e5robots.txt\u6587\u4ef6<\/p>\n<\/p>\n<p><p>robots.txt\u6587\u4ef6\u662f\u7f51\u7ad9\u7ba1\u7406\u5458\u7528\u6765\u7ba1\u7406\u722c\u866b\u884c\u4e3a\u7684\u4e00\u4e2a\u6587\u4ef6\u3002\u5b83\u4f4d\u4e8e\u7f51\u7ad9\u7684\u6839\u76ee\u5f55\uff0c\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u8f93\u5165\u201c<a href=\"https:\/\/www.example.com\/robots.txt%E2%80%9D%E6%9D%A5%E8%AE%BF%E9%97%AE%E3%80%82\">https:\/\/www.example.com\/robots.txt\u201d\u6765\u8bbf\u95ee\u3002<\/a><\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7406\u89e3robots.txt\u6587\u4ef6\u7684\u7ed3\u6784<\/strong><br \/>\u8fd9\u4e2a\u6587\u4ef6\u901a\u5e38\u5305\u542bUser-agent\u548cDisallow\u5b57\u6bb5\u3002User-agent\u6307\u5b9a\u4e86\u722c\u866b\u7684\u540d\u79f0\uff0c\u800cDisallow\u5219\u5217\u51fa\u4e86\u4e0d\u5141\u8bb8\u8bbf\u95ee\u7684\u76ee\u5f55\u3002\u901a\u8fc7\u5206\u6790\u8fd9\u4e9b\u5b57\u6bb5\uff0c\u4f60\u53ef\u4ee5\u77e5\u9053\u54ea\u4e9b\u90e8\u5206\u662f\u5f00\u653e\u7684\uff0c\u54ea\u4e9b\u662f\u4e0d\u5141\u8bb8\u722c\u53d6\u7684\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528Python\u8bfb\u53d6robots.txt\u6587\u4ef6<\/strong><br \/>\u4f60\u53ef\u4ee5\u7528Python\u7684requests\u5e93\u6765\u8bfb\u53d6robots.txt\u6587\u4ef6\uff0c\u8fdb\u800c\u89e3\u6790\u5176\u5185\u5bb9\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>url = &quot;https:\/\/www.example.com\/robots.txt&quot;<\/p>\n<p>response = requests.get(url)<\/p>\n<p>print(response.text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u4f60\u53ef\u4ee5\u81ea\u52a8\u5316\u5730\u68c0\u67e5\u591a\u4e2a\u7f51\u7ad9\u7684robots.txt\u6587\u4ef6\uff0c\u83b7\u53d6\u722c\u53d6\u6743\u9650\u4fe1\u606f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u8bf7\u6c42\u5934\u6a21\u62df\u6b63\u5e38\u6d4f\u89c8\u5668\u8bbf\u95ee<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528User-Agent\u5934<\/strong><br \/>\u5728\u53d1\u9001HTTP\u8bf7\u6c42\u65f6\uff0c\u8bb8\u591a\u7f51\u7ad9\u4f1a\u68c0\u67e5User-Agent\u5b57\u6bb5\uff0c\u4ee5\u5224\u65ad\u8bf7\u6c42\u662f\u5426\u6765\u81ea\u4e8e\u5408\u6cd5\u7684\u6d4f\u89c8\u5668\u3002\u901a\u8fc7\u8bbe\u7f6e\u5408\u9002\u7684User-Agent\uff0c\u4f60\u53ef\u4ee5\u907f\u514d\u88ab\u8bc6\u522b\u4e3a\u722c\u866b\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">headers = {<\/p>\n<p>    &#39;User-Agent&#39;: &#39;Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/58.0.3029.110 Safari\/537.3&#39;<\/p>\n<p>}<\/p>\n<p>response = requests.get(&quot;https:\/\/www.example.com&quot;, headers=headers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u6a21\u62df\u6b63\u5e38\u7528\u6237\u7684\u8bbf\u95ee\u884c\u4e3a\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u68c0\u67e5\u7f51\u7ad9\u7684\u53cd\u722c\u866b\u673a\u5236<\/strong><br \/>\u6709\u4e9b\u7f51\u7ad9\u4f1a\u4f7f\u7528JavaScript\u6311\u6218\u6216CAPTCHA\u6765\u9632\u6b62\u722c\u866b\u3002\u901a\u8fc7\u5206\u6790\u7f51\u7ad9\u7684\u54cd\u5e94\uff0c\u4f60\u53ef\u4ee5\u5224\u65ad\u662f\u5426\u5b58\u5728\u8fd9\u6837\u7684\u673a\u5236\u3002\u5982\u679c\u5b58\u5728\uff0c\u5219\u9700\u8981\u4f7f\u7528\u66f4\u590d\u6742\u7684\u53cd\u53cd\u722c\u866b\u7b56\u7565\uff0c\u5982\u4f7f\u7528Selenium\u7b49\u5de5\u5177\u6765\u5904\u7406\u52a8\u6001\u5185\u5bb9\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u9075\u5faa\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\u548c\u6cd5\u5f8b\u89c4\u5b9a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u9605\u8bfb\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e<\/strong><br \/>\u6bcf\u4e2a\u7f51\u7ad9\u90fd\u6709\u81ea\u5df1\u7684\u4f7f\u7528\u6761\u6b3e\uff0c\u901a\u5e38\u5728\u7f51\u7ad9\u7684\u5e95\u90e8\u94fe\u63a5\u4e2d\u53ef\u4ee5\u627e\u5230\u3002\u4f7f\u7528\u6761\u6b3e\u4e2d\u53ef\u80fd\u4f1a\u6709\u5173\u4e8e\u6570\u636e\u722c\u53d6\u7684\u89c4\u5b9a\u3002\u786e\u4fdd\u4f60\u5728\u722c\u53d6\u6570\u636e\u65f6\u9075\u5faa\u8fd9\u4e9b\u6761\u6b3e\uff0c\u4ee5\u514d\u5f15\u53d1\u6cd5\u5f8b\u95ee\u9898\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9075\u5faa\u6cd5\u5f8b\u89c4\u5b9a<\/strong><br \/>\u5728\u8fdb\u884c\u6570\u636e\u722c\u53d6\u65f6\uff0c\u4e86\u89e3\u76f8\u5173\u7684\u6cd5\u5f8b\u89c4\u5b9a\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u4e0d\u540c\u56fd\u5bb6\u548c\u5730\u533a\u5bf9\u6570\u636e\u722c\u53d6\u6709\u4e0d\u540c\u7684\u6cd5\u5f8b\u7ea6\u675f\u3002\u786e\u4fdd\u4f60\u7684\u722c\u53d6\u6d3b\u52a8\u7b26\u5408\u5f53\u5730\u6cd5\u5f8b\u8981\u6c42\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9053\u5fb7\u722c\u866b\u5b9e\u8df5<\/strong><br \/>\u9664\u4e86\u6cd5\u5f8b\u89c4\u5b9a\uff0c\u9075\u5faa\u9053\u5fb7\u722c\u866b\u5b9e\u8df5\u4e5f\u662f\u5f88\u91cd\u8981\u7684\u3002\u6bd4\u5982\uff0c\u8bbe\u7f6e\u5408\u7406\u7684\u722c\u53d6\u9891\u7387\u4ee5\u907f\u514d\u7ed9\u7f51\u7ad9\u5e26\u6765\u8d1f\u62c5\uff0c\u5c0a\u91cd\u7f51\u7ad9\u7684\u9690\u79c1\u653f\u7b56\uff0c\u7b49\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u4f7f\u7528\u5de5\u5177\u81ea\u52a8\u5316\u6743\u9650\u68c0\u67e5<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>robots.txt\u89e3\u6790\u5de5\u5177<\/strong><br \/>\u6709\u4e00\u4e9b\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u4f60\u81ea\u52a8\u89e3\u6790robots.txt\u6587\u4ef6\uff0c\u63d0\u4f9b\u66f4\u4e3a\u8be6\u7ec6\u7684\u722c\u53d6\u6743\u9650\u4fe1\u606f\u3002\u6bd4\u5982Python\u7684robotparser\u6a21\u5757\uff0c\u53ef\u4ee5\u7528\u6765\u5206\u6790robots.txt\u6587\u4ef6\u5e76\u5224\u65ad\u7ed9\u5b9a\u7684\u722c\u866b\u662f\u5426\u88ab\u5141\u8bb8\u8bbf\u95ee\u67d0\u4e2aURL\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from urllib.robotparser import RobotFileParser<\/p>\n<p>rp = RobotFileParser()<\/p>\n<p>rp.set_url(&quot;https:\/\/www.example.com\/robots.txt&quot;)<\/p>\n<p>rp.read()<\/p>\n<p>print(rp.can_fetch(&quot;*&quot;, &quot;https:\/\/www.example.com\/somepage&quot;))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u7f51\u7ad9\u722c\u866b\u6846\u67b6<\/strong><br \/>\u4e00\u4e9b\u722c\u866b\u6846\u67b6\uff0c\u5982Scrapy\uff0c\u5185\u7f6e\u4e86\u5904\u7406robots.txt\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u81ea\u52a8\u6839\u636erobots.txt\u6587\u4ef6\u8c03\u6574\u722c\u53d6\u7b56\u7565\u3002\u8fd9\u53ef\u4ee5\u5927\u5927\u7b80\u5316\u6743\u9650\u68c0\u67e5\u7684\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u5206\u6790\u7f51\u7ad9\u7684HTTP\u54cd\u5e94\u5934<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u68c0\u67e5X-Robots-Tag\u5934<\/strong><br \/>\u9664\u4e86robots.txt\u6587\u4ef6\uff0c\u7f51\u7ad9\u8fd8\u53ef\u4ee5\u901a\u8fc7HTTP\u54cd\u5e94\u5934\u4e2d\u7684X-Robots-Tag\u6765\u7ba1\u7406\u722c\u866b\u8bbf\u95ee\u3002\u8be5\u5934\u90e8\u53ef\u4ee5\u51fa\u73b0\u5728\u4efb\u610f\u8d44\u6e90\u7684\u54cd\u5e94\u4e2d\uff0c\u63d0\u4f9b\u66f4\u7ec6\u7c92\u5ea6\u7684\u722c\u866b\u8bbf\u95ee\u63a7\u5236\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">response = requests.get(&quot;https:\/\/www.example.com&quot;)<\/p>\n<p>print(response.headers.get(&#39;X-Robots-Tag&#39;))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u68c0\u67e5\u8fd9\u4e2a\u5934\u90e8\uff0c\u4f60\u53ef\u4ee5\u83b7\u5f97\u66f4\u591a\u5173\u4e8e\u722c\u866b\u6743\u9650\u7684\u4fe1\u606f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5206\u6790\u5176\u4ed6\u76f8\u5173\u5934\u90e8<\/strong><br \/>\u6709\u4e9b\u7f51\u7ad9\u53ef\u80fd\u4f1a\u5728\u54cd\u5e94\u5934\u4e2d\u8bbe\u7f6e\u5176\u4ed6\u4e0e\u722c\u866b\u76f8\u5173\u7684\u4fe1\u606f\uff0c\u6bd4\u5982Retry-After\u5934\u90e8\uff0c\u6307\u793a\u722c\u866b\u4f55\u65f6\u53ef\u4ee5\u518d\u6b21\u5c1d\u8bd5\u8bbf\u95ee\u3002\u8fd9\u4e9b\u4fe1\u606f\u53ef\u4ee5\u5e2e\u52a9\u4f60\u4f18\u5316\u722c\u866b\u7b56\u7565\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u4e0e\u7f51\u7ad9\u7ba1\u7406\u5458\u6c9f\u901a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u83b7\u53d6\u660e\u786e\u7684\u722c\u866b\u8bb8\u53ef<\/strong><br \/>\u5982\u679c\u4f60\u8ba1\u5212\u957f\u671f\u6216\u5927\u89c4\u6a21\u5730\u722c\u53d6\u67d0\u4e2a\u7f51\u7ad9\u7684\u6570\u636e\uff0c\u76f4\u63a5\u4e0e\u7f51\u7ad9\u7ba1\u7406\u5458\u6c9f\u901a\u5e76\u83b7\u5f97\u660e\u786e\u7684\u8bb8\u53ef\u662f\u4e00\u4e2a\u597d\u7684\u505a\u6cd5\u3002\u8fd9\u53ef\u4ee5\u907f\u514d\u6f5c\u5728\u7684\u6cd5\u5f8b\u95ee\u9898\uff0c\u540c\u65f6\u4e5f\u53ef\u80fd\u4e3a\u4f60\u63d0\u4f9b\u66f4\u597d\u7684\u6570\u636e\u8bbf\u95ee\u9014\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u53cd\u9988\u722c\u866b\u9047\u5230\u7684\u95ee\u9898<\/strong><br \/>\u5728\u722c\u53d6\u8fc7\u7a0b\u4e2d\uff0c\u5982\u679c\u4f60\u9047\u5230\u6280\u672f\u6216\u6743\u9650\u65b9\u9762\u7684\u95ee\u9898\uff0c\u53ca\u65f6\u4e0e\u7f51\u7ad9\u7ba1\u7406\u5458\u6c9f\u901a\u5e76\u53cd\u9988\u95ee\u9898\uff0c\u53ef\u80fd\u4f1a\u5f97\u5230\u5e2e\u52a9\u548c\u6307\u5bfc\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u5168\u9762\u4e86\u89e3\u548c\u83b7\u53d6Python\u722c\u866b\u7684\u6743\u9650\u4fe1\u606f\uff0c\u786e\u4fdd\u4f60\u7684\u722c\u866b\u6d3b\u52a8\u5408\u6cd5\u3001\u5408\u89c4\uff0c\u5e76\u5c3d\u53ef\u80fd\u51cf\u5c11\u5bf9\u76ee\u6807\u7f51\u7ad9\u7684\u5f71\u54cd\u3002\u65e0\u8bba\u662f\u4e2a\u4eba\u9879\u76ee\u8fd8\u662f\u5546\u4e1a\u5e94\u7528\uff0c\u9075\u5faa\u8fd9\u4e9b\u539f\u5219\u90fd\u662f\u81f3\u5173\u91cd\u8981\u7684\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5224\u65ad\u7f51\u7ad9\u662f\u5426\u5141\u8bb8\u722c\u866b\u8bbf\u95ee\uff1f<\/strong><br \/>\u5728\u4f7f\u7528Python\u8fdb\u884c\u722c\u866b\u65f6\uff0c\u4e86\u89e3\u7f51\u7ad9\u7684\u722c\u866b\u653f\u7b56\u81f3\u5173\u91cd\u8981\u3002\u60a8\u53ef\u4ee5\u67e5\u770b\u7f51\u7ad9\u6839\u76ee\u5f55\u4e0b\u7684<code>robots.txt<\/code>\u6587\u4ef6\uff0c\u8fd9\u662f\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\uff0c\u901a\u5e38\u4f4d\u4e8e<code>https:\/\/www.example.com\/robots.txt<\/code>\u3002\u8fd9\u4e2a\u6587\u4ef6\u4f1a\u5217\u51fa\u5141\u8bb8\u548c\u7981\u6b62\u722c\u866b\u8bbf\u95ee\u7684\u9875\u9762\u548c\u76ee\u5f55\u3002\u5982\u679c\u67d0\u4e9b\u9875\u9762\u88ab\u7981\u6b62\uff0c\u60a8\u5e94\u5c0a\u91cd\u8fd9\u4e9b\u89c4\u5219\uff0c\u4ee5\u514d\u8fdd\u53cd\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u5982\u4f55\u8bfb\u53d6robots.txt\u6587\u4ef6\uff1f<\/strong><br \/>\u60a8\u53ef\u4ee5\u4f7f\u7528Python\u7684<code>robotparser<\/code>\u5e93\u6765\u8bfb\u53d6\u548c\u89e3\u6790<code>robots.txt<\/code>\u6587\u4ef6\u3002\u8be5\u5e93\u63d0\u4f9b\u4e86\u7b80\u5355\u7684\u65b9\u6cd5\u6765\u68c0\u67e5\u67d0\u4e2aURL\u662f\u5426\u88ab\u5141\u8bb8\u8bbf\u95ee\u3002\u9996\u5148\uff0c\u4f7f\u7528<code>urllib<\/code>\u5e93\u83b7\u53d6<code>robots.txt<\/code>\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u7136\u540e\u7528<code>robotparser<\/code>\u89e3\u6790\u5b83\uff0c\u8fd9\u6837\u60a8\u5c31\u53ef\u4ee5\u8f7b\u677e\u68c0\u67e5\u7279\u5b9a\u9875\u9762\u662f\u5426\u53ef\u4ee5\u88ab\u722c\u866b\u8bbf\u95ee\u3002<\/p>\n<p><strong>\u5982\u679c\u7f51\u7ad9\u6ca1\u6709robots.txt\u6587\u4ef6\uff0c\u5e94\u8be5\u600e\u4e48\u529e\uff1f<\/strong><br \/>\u5982\u679c\u7f51\u7ad9\u6ca1\u6709\u63d0\u4f9b<code>robots.txt<\/code>\u6587\u4ef6\uff0c\u8fd9\u5e76\u4e0d\u610f\u5473\u7740\u60a8\u53ef\u4ee5\u968f\u610f\u722c\u53d6\u8be5\u7f51\u7ad9\u7684\u5185\u5bb9\u3002\u5efa\u8bae\u60a8\u67e5\u770b\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\uff0c\u4e86\u89e3\u6709\u5173\u6570\u636e\u6293\u53d6\u7684\u89c4\u5b9a\u3002\u5f88\u591a\u7f51\u7ad9\u5728\u5176\u9690\u79c1\u653f\u7b56\u6216\u670d\u52a1\u6761\u6b3e\u4e2d\u4f1a\u660e\u786e\u8bf4\u660e\u662f\u5426\u5141\u8bb8\u722c\u866b\u6293\u53d6\u6570\u636e\u3002\u5982\u679c\u4e0d\u786e\u5b9a\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u8054\u7cfb\u7f51\u7ad9\u7ba1\u7406\u5458\u4ee5\u83b7\u53d6\u660e\u786e\u7684\u8bb8\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u67e5\u770bPython\u722c\u866b\u6743\u9650\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u7f51\u7ad9\u7684robots.txt\u6587\u4ef6\u3001\u4f7f\u7528\u8bf7\u6c42\u5934\u6a21\u62df\u6b63\u5e38\u6d4f\u89c8\u5668\u8bbf\u95ee\u3001\u4ee5\u53ca\u9075\u5faa\u7f51\u7ad9 [&hellip;]","protected":false},"author":3,"featured_media":977573,"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\/977565"}],"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=977565"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/977565\/revisions"}],"predecessor-version":[{"id":977575,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/977565\/revisions\/977575"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/977573"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=977565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=977565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=977565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}