{"id":997102,"date":"2024-12-27T09:20:57","date_gmt":"2024-12-27T01:20:57","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/997102.html"},"modified":"2024-12-27T09:21:03","modified_gmt":"2024-12-27T01:21:03","slug":"python%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0web%e6%9f%a5%e8%af%a2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/997102.html","title":{"rendered":"python\u5982\u4f55\u5b9e\u73b0web\u67e5\u8be2"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25073044\/f8979474-d681-4cf7-875e-78a5ff6e2e62.webp\" alt=\"python\u5982\u4f55\u5b9e\u73b0web\u67e5\u8be2\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u5b9e\u73b0Web\u67e5\u8be2\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\uff1a\u4f7f\u7528requests\u5e93\u8fdb\u884cHTTP\u8bf7\u6c42\u3001\u4f7f\u7528BeautifulSoup\u8fdb\u884c\u7f51\u9875\u89e3\u6790\u3001\u4f7f\u7528Selenium\u8fdb\u884c\u52a8\u6001\u7f51\u9875\u4ea4\u4e92\u3002<\/strong>\u5176\u4e2d\uff0crequests\u5e93\u662f\u6700\u5e38\u7528\u7684\uff0c\u5b83\u53ef\u4ee5\u8f7b\u677e\u5730\u53d1\u9001HTTP\u8bf7\u6c42\u5e76\u83b7\u53d6\u54cd\u5e94\uff1bBeautifulSoup\u5219\u53ef\u4ee5\u89e3\u6790HTML\u6587\u6863\uff0c\u63d0\u53d6\u6240\u9700\u7684\u6570\u636e\uff1bSelenium\u9002\u7528\u4e8e\u90a3\u4e9b\u9700\u8981\u6a21\u62df\u7528\u6237\u64cd\u4f5c\u7684\u52a8\u6001\u7f51\u7ad9\u3002\u6211\u4eec\u63a5\u4e0b\u6765\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e09\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528REQUESTS\u5e93\u8fdb\u884cHTTP\u8bf7\u6c42<\/p>\n<\/p>\n<p><p>Requests\u5e93\u662fPython\u4e2d\u6700\u6d41\u884c\u7684HTTP\u5e93\u4e4b\u4e00\uff0c\u5b83\u7b80\u5316\u4e86HTTP\u8bf7\u6c42\u7684\u53d1\u9001\u548c\u54cd\u5e94\u7684\u5904\u7406\u3002\u4f7f\u7528Requests\u5e93\u8fdb\u884cWeb\u67e5\u8be2\u7684\u57fa\u672c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5Requests\u5e93<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4f7f\u7528Requests\u5e93\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u5b83\u5df2\u7ecf\u5b89\u88c5\u5728\u4f60\u7684Python\u73af\u5883\u4e2d\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u53d1\u9001HTTP\u8bf7\u6c42<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528Requests\u5e93\u53d1\u9001HTTP\u8bf7\u6c42\u662f\u975e\u5e38\u7b80\u5355\u7684\u3002\u8fd9\u91cc\u6709\u4e00\u4e2a\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u53d1\u9001GET\u8bf7\u6c42\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>url = &quot;https:\/\/api.example.com\/data&quot;<\/p>\n<p>response = requests.get(url)<\/p>\n<h2><strong>\u68c0\u67e5\u54cd\u5e94\u72b6\u6001\u7801<\/strong><\/h2>\n<p>if response.status_code == 200:<\/p>\n<p>    print(&quot;\u8bf7\u6c42\u6210\u529f&quot;)<\/p>\n<p>    data = response.json()  # \u89e3\u6790JSON\u54cd\u5e94<\/p>\n<p>    print(data)<\/p>\n<p>else:<\/p>\n<p>    print(&quot;\u8bf7\u6c42\u5931\u8d25\uff0c\u72b6\u6001\u7801\uff1a&quot;, response.status_code)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>requests.get()<\/code>\u65b9\u6cd5\u53d1\u9001\u4e86\u4e00\u4e2aGET\u8bf7\u6c42\uff0c\u5e76\u68c0\u67e5\u4e86\u54cd\u5e94\u7684\u72b6\u6001\u7801\u3002\u5982\u679c\u72b6\u6001\u7801\u4e3a200\uff0c\u8868\u793a\u8bf7\u6c42\u6210\u529f\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>response.json()<\/code>\u6765\u89e3\u6790JSON\u683c\u5f0f\u7684\u54cd\u5e94\u6570\u636e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5904\u7406HTTP\u54cd\u5e94<\/strong><\/p>\n<\/p>\n<p><p>Requests\u5e93\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u5904\u7406HTTP\u54cd\u5e94\u3002\u9664\u4e86<code>response.json()<\/code>\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528<code>response.text<\/code>\u83b7\u53d6\u54cd\u5e94\u7684\u539f\u59cb\u6587\u672c\uff0c\u6216\u8005\u4f7f\u7528<code>response.content<\/code>\u83b7\u53d6\u5b57\u8282\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u83b7\u53d6\u54cd\u5e94\u6587\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">response_text = response.text<\/p>\n<p>print(response_text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5bf9\u4e8e\u9700\u8981\u8ba4\u8bc1\u7684\u8bf7\u6c42\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528Requests\u5e93\u7684\u8ba4\u8bc1\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u4f7f\u7528Basic Auth\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from requests.auth import HTTPBasicAuth<\/p>\n<p>response = requests.get(url, auth=HTTPBasicAuth(&#39;username&#39;, &#39;password&#39;))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528BEAUTIFULSOUP\u8fdb\u884c\u7f51\u9875\u89e3\u6790<\/p>\n<\/p>\n<p><p>BeautifulSoup\u662f\u4e00\u4e2a\u7528\u4e8e\u4eceHTML\u548cXML\u6587\u6863\u4e2d\u63d0\u53d6\u6570\u636e\u7684\u5e93\u3002\u5b83\u63d0\u4f9b\u4e86\u7b80\u5355\u6613\u7528\u7684API\u6765\u89e3\u6790\u7f51\u9875\u5e76\u63d0\u53d6\u6240\u9700\u7684\u4fe1\u606f\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5BeautifulSoup<\/strong><\/p>\n<\/p>\n<p><p>\u8981\u4f7f\u7528BeautifulSoup\uff0c\u4f60\u9996\u5148\u9700\u8981\u5b89\u88c5\u5b83\u3002\u6211\u4eec\u901a\u5e38\u4f1a\u540c\u65f6\u5b89\u88c5<code>lxml<\/code>\uff0c\u56e0\u4e3a\u5b83\u662f\u4e00\u4e2a\u9ad8\u6548\u7684\u89e3\u6790\u5668\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install beautifulsoup4 lxml<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u89e3\u6790HTML\u6587\u6863<\/strong><\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528BeautifulSoup\u89e3\u6790HTML\u6587\u6863\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bs4 import BeautifulSoup<\/p>\n<p>import requests<\/p>\n<p>url = &quot;https:\/\/www.example.com&quot;<\/p>\n<p>response = requests.get(url)<\/p>\n<p>soup = BeautifulSoup(response.content, &#39;lxml&#39;)<\/p>\n<h2><strong>\u63d0\u53d6\u6240\u6709\u7684\u94fe\u63a5<\/strong><\/h2>\n<p>links = soup.find_all(&#39;a&#39;)<\/p>\n<p>for link in links:<\/p>\n<p>    print(link.get(&#39;href&#39;))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u4f7f\u7528Requests\u5e93\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff0c\u7136\u540e\u4f7f\u7528BeautifulSoup\u7684<code>lxml<\/code>\u89e3\u6790\u5668\u89e3\u6790HTML\u6587\u6863\u3002\u63a5\u7740\uff0c\u6211\u4eec\u4f7f\u7528<code>soup.find_all(&#39;a&#39;)<\/code>\u6765\u63d0\u53d6\u6240\u6709\u7684\u94fe\u63a5\uff0c\u5e76\u6253\u5370\u5b83\u4eec\u7684<code>href<\/code>\u5c5e\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u63d0\u53d6\u7279\u5b9a\u6570\u636e<\/strong><\/p>\n<\/p>\n<p><p>BeautifulSoup\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u63d0\u53d6\u7279\u5b9a\u6570\u636e\uff0c\u4f8b\u5982\u901a\u8fc7\u6807\u7b7e\u540d\u3001\u7c7b\u540d\u6216ID\u9009\u62e9\u5668\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u901a\u8fc7\u6807\u7b7e\u540d\u63d0\u53d6\u6807\u9898<\/p>\n<p>title = soup.find(&#39;title&#39;).text<\/p>\n<p>print(&quot;\u7f51\u9875\u6807\u9898\uff1a&quot;, title)<\/p>\n<h2><strong>\u901a\u8fc7\u7c7b\u540d\u63d0\u53d6\u7279\u5b9a\u7684\u6bb5\u843d<\/strong><\/h2>\n<p>paragraph = soup.find(&#39;p&#39;, class_=&#39;intro&#39;).text<\/p>\n<p>print(&quot;\u6bb5\u843d\u5185\u5bb9\uff1a&quot;, paragraph)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u4f7f\u7528SELENIUM\u8fdb\u884c\u52a8\u6001\u7f51\u9875\u4ea4\u4e92<\/p>\n<\/p>\n<p><p>Selenium\u662f\u4e00\u4e2a\u7528\u4e8e\u81ea\u52a8\u5316Web\u6d4f\u89c8\u5668\u64cd\u4f5c\u7684\u5de5\u5177\uff0c\u9002\u7528\u4e8e\u90a3\u4e9b\u9700\u8981\u6a21\u62df\u7528\u6237\u64cd\u4f5c\u7684\u52a8\u6001\u7f51\u7ad9\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5Selenium<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Selenium\u5e93\u548cWebDriver\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u4f7f\u7528Chrome\u6d4f\u89c8\u5668\uff0c\u4f60\u9700\u8981\u4e0b\u8f7dChromeDriver\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install selenium<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\u4e0b\u8f7d\u5e76\u89e3\u538bChromeDriver\uff0c\u5c06\u5176\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u542f\u52a8WebDriver<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528Selenium\u8fdb\u884cWeb\u67e5\u8be2\u7684\u57fa\u672c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<h2><strong>\u542f\u52a8Chrome WebDriver<\/strong><\/h2>\n<p>driver = webdriver.Chrome()<\/p>\n<h2><strong>\u6253\u5f00\u7f51\u9875<\/strong><\/h2>\n<p>driver.get(&quot;https:\/\/www.example.com&quot;)<\/p>\n<h2><strong>\u67e5\u627e\u5143\u7d20\u5e76\u8fdb\u884c\u4ea4\u4e92<\/strong><\/h2>\n<p>search_box = driver.find_element_by_name(&quot;q&quot;)<\/p>\n<p>search_box.send_keys(&quot;Python&quot;)<\/p>\n<p>search_box.submit()<\/p>\n<h2><strong>\u83b7\u53d6\u641c\u7d22\u7ed3\u679c<\/strong><\/h2>\n<p>results = driver.find_elements_by_css_selector(&quot;.result&quot;)<\/p>\n<p>for result in results:<\/p>\n<p>    print(result.text)<\/p>\n<h2><strong>\u5173\u95ed\u6d4f\u89c8\u5668<\/strong><\/h2>\n<p>driver.quit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u542f\u52a8Chrome WebDriver\u5e76\u6253\u5f00\u4e00\u4e2a\u7f51\u9875\u3002\u63a5\u7740\uff0c\u6211\u4eec\u67e5\u627e\u641c\u7d22\u6846\u5143\u7d20\u5e76\u8f93\u5165\u67e5\u8be2\u5173\u952e\u8bcd\uff0c\u7136\u540e\u63d0\u4ea4\u8868\u5355\u3002\u6700\u540e\uff0c\u6211\u4eec\u83b7\u53d6\u641c\u7d22\u7ed3\u679c\u5e76\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5904\u7406JavaScript\u751f\u6210\u7684\u5185\u5bb9<\/strong><\/p>\n<\/p>\n<p><p>Selenium\u7684\u4e00\u4e2a\u4e3b\u8981\u4f18\u52bf\u662f\u80fd\u591f\u5904\u7406JavaScript\u751f\u6210\u7684\u5185\u5bb9\uff0c\u56e0\u4e3a\u5b83\u5b9e\u9645\u4e0a\u662f\u5728\u64cd\u4f5c\u4e00\u4e2a\u771f\u5b9e\u7684\u6d4f\u89c8\u5668\u3002\u56e0\u6b64\uff0c\u5bf9\u4e8e\u90a3\u4e9b\u9700\u8981\u7b49\u5f85JavaScript\u52a0\u8f7d\u5b8c\u6210\u7684\u5185\u5bb9\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528WebDriverW<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium.webdriver.common.by import By<\/p>\n<p>from selenium.webdriver.support.ui import WebDriverWait<\/p>\n<p>from selenium.webdriver.support import expected_conditions as EC<\/p>\n<h2><strong>\u7b49\u5f85\u5143\u7d20\u52a0\u8f7d\u5b8c\u6210<\/strong><\/h2>\n<p>element = WebDriverWait(driver, 10).until(<\/p>\n<p>    EC.presence_of_element_located((By.ID, &quot;result&quot;))<\/p>\n<p>)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u603b\u7ed3\uff1a<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u5b9e\u73b0Web\u67e5\u8be2\uff0cRequests\u5e93\u9002\u5408\u5904\u7406\u7b80\u5355\u7684HTTP\u8bf7\u6c42\uff0cBeautifulSoup\u9002\u5408\u89e3\u6790\u9759\u6001HTML\u5185\u5bb9\uff0c\u800cSelenium\u9002\u5408\u5904\u7406\u9700\u8981\u52a8\u6001\u4ea4\u4e92\u7684\u7f51\u9875\u3002\u6839\u636e\u4e0d\u540c\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u548c\u6570\u636e\u83b7\u53d6\u7684\u51c6\u786e\u6027\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u5de5\u5177\uff0c\u7406\u89e3\u76ee\u6807\u7f51\u9875\u7684\u7ed3\u6784\u548c\u8bf7\u6c42\u65b9\u5f0f\u662f\u6210\u529f\u8fdb\u884cWeb\u67e5\u8be2\u7684\u5173\u952e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u8fdb\u884c\u7f51\u9875\u6293\u53d6\uff1f<\/strong><br \/>\u4f7f\u7528Python\u8fdb\u884c\u7f51\u9875\u6293\u53d6\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u5e93\u5b9e\u73b0\uff0c\u4f8b\u5982Requests\u548cBeautifulSoup\u3002\u9996\u5148\uff0c\u4f7f\u7528Requests\u5e93\u53d1\u9001HTTP\u8bf7\u6c42\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\u3002\u63a5\u7740\uff0c\u5229\u7528BeautifulSoup\u89e3\u6790HTML\u6587\u6863\uff0c\u4ece\u4e2d\u63d0\u53d6\u6240\u9700\u7684\u6570\u636e\u3002\u6700\u540e\uff0c\u53ef\u4ee5\u5c06\u63d0\u53d6\u7684\u6570\u636e\u5b58\u50a8\u5230CSV\u6587\u4ef6\u6216\u6570\u636e\u5e93\u4e2d\u4ee5\u4fbf\u540e\u7eed\u4f7f\u7528\u3002<\/p>\n<p><strong>Python\u4e2d\u6709\u54ea\u4e9b\u5e93\u53ef\u4ee5\u5e2e\u52a9\u8fdb\u884c\u7f51\u7edc\u8bf7\u6c42\uff1f<\/strong><br \/>Python\u6709\u591a\u4e2a\u5e93\u53ef\u4ee5\u7528\u4e8e\u7f51\u7edc\u8bf7\u6c42\uff0c\u6700\u5e38\u7528\u7684\u5305\u62ecRequests\u3001http.client\u548curllib\u3002Requests\u5e93\u4ee5\u5176\u7b80\u6d01\u7684\u8bed\u6cd5\u548c\u5f3a\u5927\u7684\u529f\u80fd\u800c\u53d7\u5230\u5e7f\u6cdb\u6b22\u8fce\uff0c\u9002\u5408\u53d1\u9001GET\u548cPOST\u8bf7\u6c42\u3002\u800chttp.client\u548curllib\u5219\u662fPython\u6807\u51c6\u5e93\u7684\u4e00\u90e8\u5206\uff0c\u867d\u7136\u529f\u80fd\u76f8\u5bf9\u8f83\u4f4e\uff0c\u4f46\u5bf9\u4e8e\u7b80\u5355\u7684\u8bf7\u6c42\u4efb\u52a1\u4e5f\u8db3\u591f\u7528\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u7f51\u9875\u4e2d\u7684\u52a8\u6001\u5185\u5bb9\uff1f<\/strong><br \/>\u6293\u53d6\u52a8\u6001\u5185\u5bb9\u901a\u5e38\u9700\u8981\u4f7f\u7528Selenium\u5e93\uff0c\u5b83\u80fd\u591f\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\uff0c\u4ece\u800c\u6293\u53d6\u7531JavaScript\u751f\u6210\u7684\u5185\u5bb9\u3002\u901a\u8fc7Selenium\uff0c\u7528\u6237\u53ef\u4ee5\u63a7\u5236\u6d4f\u89c8\u5668\u6253\u5f00\u7f51\u9875\uff0c\u7b49\u5f85\u9875\u9762\u52a0\u8f7d\u5b8c\u6210\u540e\u6293\u53d6\u6240\u9700\u6570\u636e\u3002\u6b64\u5916\uff0c\u4f7f\u7528Selenium\u65f6\uff0c\u7528\u6237\u8fd8\u53ef\u4ee5\u8fdb\u884c\u4ea4\u4e92\uff0c\u4f8b\u5982\u70b9\u51fb\u6309\u94ae\u6216\u586b\u5199\u8868\u5355\uff0c\u4ece\u800c\u83b7\u53d6\u66f4\u590d\u6742\u7684\u52a8\u6001\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5b9e\u73b0Web\u67e5\u8be2\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\uff1a\u4f7f\u7528requests\u5e93\u8fdb\u884cHTTP\u8bf7\u6c42\u3001\u4f7f\u7528Beautif [&hellip;]","protected":false},"author":3,"featured_media":997117,"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\/997102"}],"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=997102"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/997102\/revisions"}],"predecessor-version":[{"id":997118,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/997102\/revisions\/997118"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/997117"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=997102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=997102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=997102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}