{"id":23,"date":"2024-03-04T22:26:18","date_gmt":"2024-03-04T14:26:18","guid":{"rendered":"https:\/\/blog.zeronely.cn\/?p=23"},"modified":"2024-03-04T22:46:30","modified_gmt":"2024-03-04T14:46:30","slug":"%e8%b1%86%e7%93%a3%e8%af%84%e8%ae%ba%e7%88%ac%e8%99%ab","status":"publish","type":"post","link":"https:\/\/blog.zeronely.cn\/index.php\/2024\/03\/04\/%e8%b1%86%e7%93%a3%e8%af%84%e8%ae%ba%e7%88%ac%e8%99%ab\/","title":{"rendered":"\u8c46\u74e3\u8bc4\u8bba\u722c\u866b"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1.\u722c\u866b\u4ecb\u7ecd<\/h2>\n\n\n\n<p>\u8be5\u8c46\u74e3\u8bc4\u8bba\u722c\u866b\u662f\u4f36\u8863\u5728\u4e3a\u5927\u521b\u9879\u76ee\u505a\u51c6\u5907\u65f6\u7684\u526f\u4ea7\u7269\uff0c\u603b\u7684\u6765\u8bf4\uff0c\u662f\u4e00\u4e2a\u529f\u80fd\u5c1a\u53ef\u7684\u57fa\u4e8erequests\u5e93\u7684\u722c\u866b<s>\uff08\u56e0\u4e3a\u5168\u7f51\u90fd\u6ca1\u6709\u627e\u5230\u53ef\u4ee5\u7528\u7684\u6240\u4ee5\u5c31\u81ea\u5df1\u5199\u4e86\uff09<\/s>\uff0c\u5728\u8fd9\u7bc7\u535a\u6587\u4e2d\uff0c\u4f36\u8863\u5c06\u4ecb\u7ecd\u8fd9\u4e00\u722c\u866b\u7684\u5b9e\u73b0\u539f\u7406\uff0c\u5e76\u5206\u4eab\u6e90\u4ee3\u7801\u3002\u8be5\u722c\u866b\u7684\u529f\u80fd\u4e3a\uff0c<strong>\u8f93\u5165\u4e00\u4e2a\u7535\u5f71\u540d\u79f0\uff0c\u83b7\u53d6\u4e00\u5b9a\u9875\u6570\uff08\u53ef\u8c03\u8282\uff09\u7684\u8c46\u74e3\u77ed\u8bc4<\/strong>\u3002\u6d89\u53ca\u5230\u7684\u722c\u866b\u6280\u672f\u6709\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>cookie\u6a21\u62df\u767b\u5f55<\/li>\n\n\n\n<li>\u5229\u7528selenium\u5e93\uff0c\u542f\u52a8chromedriver\uff0c\u4ece\u800c\u83b7\u53d6js\u6e32\u67d3\u7684\u7f51\u9875\u5185\u5bb9<\/li>\n\n\n\n<li>\u5229\u7528xpath\u63d0\u53d6\u7f51\u9875\u5185\u5bb9<\/li>\n\n\n\n<li>\u5229\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u5bf9\u5e94\u5b57\u7b26\u4e32<\/li>\n\n\n\n<li>\u5199\u5165csv\u6587\u4ef6<\/li>\n<\/ul>\n\n\n\n<p>\u7531\u4e8epython\u5e93\u7684\u4e0d\u65ad\u66f4\u65b0\uff0c\u4ee5\u53ca\u8c46\u74e3\u7f51\u7ad9\u7684\u52a8\u6001\u66f4\u65b0\u4ee5\u53ca\u53d8\u5316\uff0c\u722c\u866b\u5e76\u4e0d\u603b\u6709\u6548\uff0c\u4f46\u601d\u8def\u7c7b\u4f3c\uff0c\u5982\u679c\u770b\u5230\u8fd9\u7bc7\u6587\u7ae0\u65f6\uff0c\u51fa\u73b0\u4ee3\u7801\u62a5\u9519\uff0c\u53ef\u4ee5<strong>\u90ae\u4ef6\u8054\u7cfb\u4f36\u8863<\/strong>\uff0c\u8fd9\u5e76\u4e0d\u662f\u4ee3\u7801\u95ee\u9898\uff0c\u800c\u662f\u66f4\u65b0\u540e\u5bfc\u81f4\u7684\u4ee3\u7801\u6216\u662f\u7f51\u7ad9\u53d8\u5316\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2.\u524d\u671f\u51c6\u5907<\/h2>\n\n\n\n<p>\u9996\u5148\uff0c\u663e\u7136\uff0c\u4f60\u9700\u8981\u62e5\u6709\u4e00\u4e2apython\u7684IDE\uff0c<s>\u5f53\u7136\uff0c\u4f5c\u4e3a\u4e00\u79cd\u89e3\u91ca\u578b\u8bed\u8a00\uff0c\u5012\u4e5f\u4e0d\u662f\u5fc5\u987b<\/s>\u3002<\/p>\n\n\n\n<p>\u7136\u540e\uff0c\u8bf7\u4f7f\u7528pip\u5b89\u88c5\u4ee5\u4e0bpython\u5e93<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>requests<\/li>\n\n\n\n<li>lxml<\/li>\n\n\n\n<li>selenium<\/li>\n\n\n\n<li>time<\/li>\n\n\n\n<li>re<\/li>\n\n\n\n<li>csv<\/li>\n<\/ul>\n\n\n\n<p>\u5f53\u62e5\u6709\u4e86\u8fd9\u4e9b\u73af\u5883\uff0c\u4f60\u8fd8\u9700\u8981chrome\u6d4f\u89c8\u5668\u548c<strong>\u5bf9\u5e94\u7248\u672c<\/strong>\u7684\u7684chromedriver\uff0c\u8fd9\u91cc\u4f36\u8863\u5c31\u4e0d\u4ecb\u7ecd\u5982\u4f55\u5b89\u88c5\u4e86\uff0c\u5728\u5404\u79cd\u5730\u65b9\u53ef\u4ee5\u627e\u5230\u8bb8\u591a\u6559\u7a0b\uff0c<s>\u5176\u4e2d\u6709\u4e0d\u5c11\u5f88\u4e0d\u9760\u8c31\u7684<\/s>\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3.\u590d\u5236\u4ee3\u7801<\/h2>\n\n\n\n<p>\u5f53\u62e5\u6709\u4e86\u4ee5\u4e0a\u73af\u5883\uff0c\u5c31\u53ef\u4ee5\u76f4\u63a5\u590d\u5236\u4ee3\u7801\u4e86<s>\uff08\u7b11\uff09<\/s>\uff0c\u76f8\u4fe1\u5927\u5bb6\u548c\u4f36\u8863\u4e00\u6837\uff0c\u5927\u591a\u6570\u65f6\u5019\u627e\u5230\u8fd9\u6837\u4e00\u7bc7\u6559\u7a0b\uff0c\u9700\u8981\u7684\u90fd\u4e0d\u662f\u5982\u4f55\u53bb\u505a\uff0c\u4e3a\u4ec0\u4e48\u8fd9\u6837\u505a\uff0c\u800c\u662f\u60f3\u8981\u4e00\u4e2a\u73b0\u6210\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u6240\u4ee5\u76f4\u63a5\uff0c\u4e0a\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import requests\nfrom lxml import etree\nfrom selenium import webdriver\nfrom selenium.webdriver.common.by import By\nimport time\nimport re\nimport csv\n\nheaders ={\n    'User-Agent' : 'Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/121.0.0.0 Safari\/537.36',\n    'Cookie':'',\n\n#\u5982\u679c\u4f60\u9700\u8981\u722c\u53d6\u591a\u9875\uff0c\u4f60\u53ef\u4ee5\u653e\u5165\u4f60\u81ea\u5df1\u7684cookie\uff0c\u4f36\u8863\u4e0d\u4fbf\u63d0\u4f9b\uff08\n#\u8fd9\u662f\u4ee3\u7801\u4e2d\u552f\u4e00\u7f3a\u5c11\u7684\u7247\u6bb5\n    }\n\n\nname =input('\u8bf7\u8f93\u5165\u7535\u5f71\u540d\u79f0\uff1a')\nurl_douban=\"https:\/\/www.douban.com\/search?source=suggest&amp;q=\"+name\n\noption=webdriver.ChromeOptions()\noption.add_argument('--headless')\n\nbrowser = webdriver.Chrome(options=option)\nbrowser.get(url_douban)\ntime.sleep(3)\na = browser.find_element(By.XPATH, \"\/\/ul\/li\/div\/div\/div\/div\/a\")\n\nhref = a.get_attribute(\"href\")\nprint(href)\nid = re.match('https.*movie\/(.*)',href).group(1)\nbrowser.close()\n#print(id)\n\nurl = \"https:\/\/movie.douban.com\/subject\/\"+id+\"\/comments?status=P\"\n\nr = requests.get(url,headers=headers).text\n\nhtml = etree.HTML(r)\n\ncomments = html.xpath('\/\/div&#91;@class=\"comment\"]')\nfor comment in comments:\n    \n    grades = comment.xpath('.\/\/span&#91;contains(@class,\"rating\")]')\n    texts = comment.xpath('.\/\/span&#91;@class=\"short\"]')\n    text = texts&#91;0].xpath('.\/text()')&#91;0]\n    \n    if len(grades)&gt;0:\n        grade = grades&#91;0].xpath('.\/@class')&#91;0]&#91;7:8]+'stars'\n    else:\n        grade = '\u6682\u65e0\u8bc4\u4ef7'\n    filename = name+'.csv'\n    with open(filename,'a+',encoding='utf-8-sig') as csvfile:\n        writer = csv.writer(csvfile)\n        writer.writerow(&#91;text,grade])\n\nfor i in range(20,2000,20):\n    \nstart = str(i)\n    url = 'https:\/\/movie.douban.com\/subject\/'+id+'\/comments?start='+start+\"&amp;limit=20&amp;status=P&amp;sort=new_score\"\n    \n    r = requests.get(url,headers=headers).text\n\n    html = etree.HTML(r)\n\n    comments = html.xpath('\/\/div&#91;@class=\"comment\"]')\n    for comment in comments:\n        \ngrades = comment.xpath('.\/\/span&#91;contains(@class,\"rating\")]')\n        texts = comment.xpath('.\/\/span&#91;@class=\"short\"]')\n        text = texts&#91;0].xpath('.\/text()')&#91;0]\n        if len(grades)&gt;0:\n            grade = grades&#91;0].xpath('.\/@class')&#91;0]&#91;7:8]+'stars'\n        else:\n            grade = '\u6682\u65e0\u8bc4\u4ef7'\n        \n        filename = name+'.csv'\n        with open(filename,'a+',encoding='utf-8-sig') as csvfile:\n            writer = csv.writer(csvfile)\n            writer.writerow(&#91;text,grade])\n\n    \n<\/code><\/pre>\n\n\n\n<p>\u590d\u5236\u5b8c\u4ee3\u7801\uff0c\u76f4\u63a5\u8fd0\u884c\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4.\u5b9e\u73b0\u539f\u7406<\/h2>\n\n\n\n<p>\u65e2\u7136\u770b\u5230\u4e86\u8fd9\u91cc\uff0c\u8bf4\u660e\u662f\u60f3\u5b66\u4e60\u9760\u81ea\u5df1\u5b8c\u6210\u4e00\u4e2a\u722c\u866b\u4e86\uff0c\u8fd9\u5f88\u597d\uff01<\/p>\n\n\n\n<p>\u770b\u5230\u8fd9\u91cc\uff0c\u4e5f\u8bb8\u4f60\u4f1a\u60f3\u5410\u69fd\uff0c\u4e3a\u4ec0\u4e48\u4f36\u8863\u5199\u7684\u4ee3\u7801\u6ca1\u6709\u4e00\u70b9\u6ce8\u91ca\uff0c\u6211\u5f88\u60f3\u8bf4\uff0c\u662f\u4e3a\u4e86\u8ba9\u5927\u5bb6\u65b9\u4fbf\u590d\u5236\uff0c\u4f46\u4e0d\u5e78\u7684\u662f\uff0c\u8fd9\u662f\u4f36\u8863\u7684\u4ee3\u7801\u4e60\u60ef\u6bd4\u8f83\u5dee\uff0c\u4e3a\u4e86\u5feb\u901f\u5b8c\u6210\u4ee3\u7801\uff0c\u6ca1\u6709\u5199\u6ce8\u91ca\uff0c\u5927\u5bb6\u4e0d\u8981\u5b66\u4e60\uff01<s>\u5e0c\u671b\u6709\u4e00\u5929\u6211\u80fd\u6539\u6389\u8fd9\u70b9QwQ<\/s><\/p>\n\n\n\n<p>\u89e3\u91ca\u539f\u7406\u4e5f\u5c31\u662f\u8865\u5145\u6ce8\u91ca\u7684\u73af\u8282\u4e86hhh<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\u5bfc\u5165\u5bf9\u5e94\u5e93\nimport requests\nfrom lxml import etree\nfrom selenium import webdriver\nfrom selenium.webdriver.common.by import By\nimport time\nimport re\nimport csv\n\n#\u521b\u5efa\u8bf7\u6c42\u5934\n#\u8fd9\u91cc\u6d89\u53ca\u5230cookie\uff0c\u56e0\u4e3a\u8c46\u74e3\u7684\u8bc4\u8bba\u5982\u679c\u4e0d\u767b\u5f55\u53ea\u80fd\u770b\u524d\u51e0\u9875\uff0c\u65e0\u6cd5\u722c\u53d6\uff0c\u6240\u4ee5\u4f7f\u7528cookie\u8bb0\u5f55\u767b\u5f55\u72b6\u6001\n#\u4e0d\u52a0cookie\u4e5f\u53ef\uff0c\u80fd\u90e8\u5206\u722c\u53d6\nheaders ={\n    'User-Agent' : 'Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/121.0.0.0 Safari\/537.36',\n    'Cookie':'',\n\n#\u5982\u679c\u4f60\u9700\u8981\u722c\u53d6\u591a\u9875\uff0c\u4f60\u53ef\u4ee5\u653e\u5165\u4f60\u81ea\u5df1\u7684cookie\uff0c\u4f36\u8863\u4e0d\u4fbf\u63d0\u4f9b\uff08\n#\u8fd9\u662f\u4ee3\u7801\u4e2d\u552f\u4e00\u7f3a\u5c11\u7684\u7247\u6bb5\n    }\n\n\nname =input('\u8bf7\u8f93\u5165\u7535\u5f71\u540d\u79f0\uff1a')\n\n#\u5229\u7528\u5b57\u7b26\u4e32\u62fc\u63a5\u83b7\u53d6\u6240\u9700\u7535\u5f71\u7684\u641c\u7d22\u4ee3\u7801\n#\u5efa\u8bae\u4f7f\u7528params\u4f20\u53c2\u7684\u65b9\u5f0f\uff0c\u770b\u8d77\u6765\u4f1a\u4e13\u4e1a\u5f88\u591a\uff08bushi\uff09\nurl_douban=\"https:\/\/www.douban.com\/search?source=suggest&amp;q=\"+name\n\n#\u63a5\u4e0b\u6765\u8fd9\u90e8\u5206\u662f\u7528\u4e8e\u722c\u53d6\u7535\u5f71\u5bf9\u5e94id\u7684\n#\u521b\u5efawebdriver.ChromeOptions\u5b9e\u4f8b\uff0c\u7528\u4e8e\u9690\u85cf\u6d4f\u89c8\u5668\uff0c\u5e76\u4f5c\u4e3a\u53c2\u6570\n#\u8fd9\u91cc\u4f36\u8863\u4f7f\u7528\u7684\u662fchrome\uff0c\u56e0\u4e3aid\u53c2\u6570\u51fa\u73b0\u5728js\u6e32\u67d3\u7684\u5185\u5bb9\u4e2d\uff0c\u9700\u8981\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u83b7\u53d6elements\u4e2d\u7684\u5185\u5bb9\noption=webdriver.ChromeOptions()\noption.add_argument('--headless')\n\n#\u5f00\u59cb\u83b7\u53d6id\nbrowser = webdriver.Chrome(options=option)\nbrowser.get(url_douban)#get\u65b9\u5f0f\u83b7\u53d6elements\ntime.sleep(3)#\u4e0d\u80fd\u7701\u7565\uff0c\u5982\u679c\u51fa\u73b0\u62a5\u9519\uff0c\u53ef\u5c1d\u8bd5\u5ef6\u957f\u6539\u65f6\u95f4\uff0c\u53d6\u51b3\u4e8e\u7f51\u901f\na = browser.find_element(By.XPATH, \"\/\/ul\/li\/div\/div\/div\/div\/a\")#\u5229\u7528xpath\u9009\u62e9\u5668\u83b7\u53d6url\n#\u6ce8\u610f\uff0c\u4ee5\u4e0a\u662f\u65b0\u7684\u8bed\u6cd5\uff0c\u5f88\u591a\u5728\u5f53\u524d\u65f6\u95f4\u65e0\u6cd5\u4f7f\u7528\u7684\u51fd\u6570\u6b63\u662f\u56e0\u4e3aselenium\u5e93\u6539\u53d8\u4e86\u8bed\u6cd5\n#\u4e3a\u4e86\u5f97\u77e5\u8fd9\u4e00\u70b9\uff0c\u4f36\u8863\u770b\u4e86\u5f88\u591a\u653b\u7565\uff0c\u751a\u81f3\u9605\u8bfb\u8bf4\u660e\u6587\u6863\uff0c\u6028\u5ff5\u6781\u6df1\n<s>#\u6ca1\u4e8b\u6539\u4ec0\u4e48\u8bed\u6cd5\uff0cgiao\uff01<\/s>\nhref = a.get_attribute(\"href\")\nprint(href)\nid = re.match('https.*movie\/(.*)',href).group(1)#\u5229\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6id\nbrowser.close()\n#print(id)\n\n#\u5b57\u7b26\u4e32\u62fc\u63a5\uff0c\u83b7\u53d6\u77ed\u8bc4\u7684url\u5730\u5740\nurl = \"https:\/\/movie.douban.com\/subject\/\"+id+\"\/comments?status=P\"\n#\u4f7f\u7528requests\u5e93\uff0c\u5e76\u5c06\u8fd4\u56de\u7684\u4fe1\u606f\u8f6c\u5316\u4e3ahtml\u7684\u683c\u5f0f\u5316\u4fe1\u606f\nr = requests.get(url,headers=headers).text\nhtml = etree.HTML(r)\n\n#\u5229\u7528xpath\u9009\u62e9\u5668\u83b7\u53d6\u9700\u8981\u7684\u8bc4\u8bba\ncomments = html.xpath('\/\/div&#91;@class=\"comment\"]')\nfor comment in comments:\n    #\u8fd9\u662f\u4e00\u4e2a\u5faa\u73af\uff0c\u5faa\u73af\u83b7\u53d6\u5355\u9875\u4fe1\u606f\n    grades = comment.xpath('.\/\/span&#91;contains(@class,\"rating\")]')\n    texts = comment.xpath('.\/\/span&#91;@class=\"short\"]')\n    text = texts&#91;0].xpath('.\/text()')&#91;0]\n    \n    if len(grades)>0:\n        grade = grades&#91;0].xpath('.\/@class')&#91;0]&#91;7:8]+'stars'\n    else:\n        grade = '\u6682\u65e0\u8bc4\u4ef7'\n    #\u5c06\u83b7\u53d6\u5230\u7684\u5185\u5bb9\u5199\u5165csv\uff0c\u65b9\u4fbf\u540e\u7eed\u8dd1\u6df1\u5ea6\u5b66\u4e60\u7b97\u6cd5\n    filename = name+'.csv'\n    with open(filename,'a+',encoding='utf-8-sig') as csvfile:\n        writer = csv.writer(csvfile)\n        writer.writerow(&#91;text,grade])\n\n#\u8fd9\u4e2a\u5faa\u73af\u7528\u4e8e\u83b7\u53d6\u591a\u9875\u4fe1\u606f\n#\u6216\u8bb8\u4f1a\u6ce8\u610f\u5230\u548c\u524d\u9762\u7684\u5185\u5bb9\u4e00\u6837\uff0c\u56e0\u4e3a\u6bcf\u4e00\u9875\u548c\u7b2c\u4e00\u9875\u7684url\u4e0d\u540c\nfor i in range(20,2000,20):\n    \nstart = str(i)\n    url = 'https:\/\/movie.douban.com\/subject\/'+id+'\/comments?start='+start+\"&amp;limit=20&amp;status=P&amp;sort=new_score\"\n#\u5b57\u7b26\u4e32\u62fc\u63a5\uff0c\u8fd9\u91cc\u662f\u89c2\u5bdf\u5230\uff0c\u6bcf\u4e00\u9875\u7684start\u53c2\u6570\u6b63\u597d\u589e\u52a0\u201c20\u201d\n    \n    r = requests.get(url,headers=headers).text\n\n    html = etree.HTML(r)\n\n    comments = html.xpath('\/\/div&#91;@class=\"comment\"]')\n    for comment in comments:\n        \ngrades = comment.xpath('.\/\/span&#91;contains(@class,\"rating\")]')\n        texts = comment.xpath('.\/\/span&#91;@class=\"short\"]')\n        text = texts&#91;0].xpath('.\/text()')&#91;0]\n        if len(grades)>0:\n            grade = grades&#91;0].xpath('.\/@class')&#91;0]&#91;7:8]+'stars'\n        else:\n            grade = '\u6682\u65e0\u8bc4\u4ef7'\n        \n        filename = name+'.csv'\n        with open(filename,'a+',encoding='utf-8-sig') as csvfile:\n            writer = csv.writer(csvfile)\n            writer.writerow(&#91;text,grade])<\/code><\/pre>\n\n\n\n<p>\u4ee5\u4e0a\uff0c\u5168\u90e8\u539f\u7406\u89e3\u91ca\u5b8c\u6bd5\uff0c\u56e0\u4e3a\u65f6\u95f4\u6bd4\u8f83\u7d27\uff0c\u6240\u4ee5\u53ea\u5199\u4e86\u91cd\u70b9\u90e8\u5206\uff0c\u5982\u6709\u7591\u95ee\u53ef\u4ee5\u90ae\u7bb1\u8054\u7cfb\u4f36\u8863\uff0c\u6709\u7a7a\u4f1a\u89e3\u7b54\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5.\u7ed3\u8bed<\/h2>\n\n\n\n<p>\u603b\u7684\u6765\u8bf4\uff0c\u4f36\u8863\u5bf9\u8fd9\u4e2a\u722c\u866b\u8fd8\u633a\u6ee1\u610f\u7684\uff0c\u4f46\u662f\u6bd5\u7adf\u4f36\u8863\u4e5f\u53ea\u662f\u5c0f\u840c\u65b0\uff0c\u5982\u679c\u6709\u4ec0\u4e48\u95ee\u9898\u5e0c\u671b\u53ef\u4ee5\u6279\u8bc4\u6307\u6b63\uff01\u5728\u5b66\u4e60\u722c\u866b\u548c\u5199\u4e00\u4e2a\u5b9e\u9645\u7684\u722c\u866b\u7a0b\u5e8f\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4f36\u8863\u83b7\u76ca\u826f\u591a\uff0c\u4e5f\u63a5\u89e6\u5230\u4e00\u4e9b\u8ba1\u7b97\u673a\u7f51\u7edc\u548chtml\u5bf9\u5e94\u7684\u77e5\u8bc6\uff0c\u5982\u679c\u4f60\u4e5f\u5e0c\u671b\u5b66\u4e60\u722c\u866b\uff0c\u6700\u597d\u5bf9\u4e8ehtml\u3001css\u548cjs\u6709\u521d\u6b65\u7684\u4e86\u89e3\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u722c\u866b\u4ecb\u7ecd \u8be5\u8c46\u74e3\u8bc4\u8bba\u722c\u866b\u662f\u4f36\u8863\u5728\u4e3a\u5927\u521b\u9879\u76ee\u505a\u51c6\u5907\u65f6\u7684\u526f\u4ea7\u7269\uff0c\u603b\u7684\u6765\u8bf4\uff0c\u662f\u4e00\u4e2a\u529f\u80fd\u5c1a\u53ef\u7684\u57fa\u4e8erequests [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,3,8],"tags":[],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-python","category-3","category-8"],"_links":{"self":[{"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":2,"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/posts\/23\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zeronely.cn\/index.php\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}