{"id":1108517,"date":"2025-01-08T17:01:02","date_gmt":"2025-01-08T09:01:02","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1108517.html"},"modified":"2025-01-08T17:01:05","modified_gmt":"2025-01-08T09:01:05","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e7%bd%91%e7%bb%9c%e7%88%ac%e8%99%ab%e7%88%ac%e5%8f%96%e5%a4%a7%e9%87%8f%e5%9b%be%e7%89%87","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1108517.html","title":{"rendered":"\u5982\u4f55\u7528python\u7f51\u7edc\u722c\u866b\u722c\u53d6\u5927\u91cf\u56fe\u7247"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25072126\/6c423a58-5c79-417a-9d83-9ab84e050f71.webp\" alt=\"\u5982\u4f55\u7528python\u7f51\u7edc\u722c\u866b\u722c\u53d6\u5927\u91cf\u56fe\u7247\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u7528Python\u7f51\u7edc\u722c\u866b\u722c\u53d6\u5927\u91cf\u56fe\u7247<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528Python\u7f51\u7edc\u722c\u866b\u722c\u53d6\u5927\u91cf\u56fe\u7247\u7684\u5173\u952e\u662f<strong>\u9009\u62e9\u5408\u9002\u7684\u5e93\u3001\u5904\u7406\u53cd\u722c\u673a\u5236\u3001\u89e3\u6790\u7f51\u9875\u5185\u5bb9\u3001\u4fdd\u5b58\u56fe\u7247<\/strong>\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u5e76\u63d0\u4f9b\u5b8c\u6574\u7684\u4ee3\u7801\u793a\u4f8b\uff0c\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u7406\u89e3\u548c\u5b9e\u73b0\u8fd9\u4e2a\u8fc7\u7a0b\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u5c55\u5f00\u5982\u4f55\u4f7f\u7528Python\u8fdb\u884c\u7f51\u7edc\u722c\u866b\u4ee5\u722c\u53d6\u5927\u91cf\u56fe\u7247\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u9009\u62e9\u5408\u9002\u7684\u5e93<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6709\u8bb8\u591a\u5e93\u53ef\u4ee5\u7528\u4e8e\u7f51\u7edc\u722c\u866b\u548c\u56fe\u7247\u4e0b\u8f7d\uff0c\u5e38\u7528\u7684\u5305\u62ec<strong>requests\u3001BeautifulSoup\u3001urllib\u3001Selenium<\/strong>\u7b49\u3002<strong>requests\u5e93\u7528\u4e8e\u53d1\u9001HTTP\u8bf7\u6c42\uff0c\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff1bBeautifulSoup\u5e93\u7528\u4e8e\u89e3\u6790HTML\u5185\u5bb9\uff0c\u63d0\u53d6\u6240\u9700\u7684\u6570\u636e\uff1bSelenium\u5e93\u7528\u4e8e\u5904\u7406\u52a8\u6001\u52a0\u8f7d\u7684\u7f51\u9875\uff1burllib\u5e93\u7528\u4e8e\u4e0b\u8f7d\u56fe\u7247<\/strong>\u3002<\/p>\n<\/p>\n<p><h4>1.1\u3001Requests\u5e93<\/h4>\n<\/p>\n<p><p>Requests\u5e93\u662f\u4e00\u4e2a\u7b80\u5355\u6613\u7528\u7684HTTP\u5e93\uff0c\u53ef\u4ee5\u7528\u6765\u53d1\u9001\u5404\u79cdHTTP\u8bf7\u6c42\uff0c\u5982GET\u3001POST\u7b49\u3002\u5b83\u53ef\u4ee5\u8f7b\u677e\u5730\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>url = &quot;http:\/\/example.com&quot;<\/p>\n<p>response = requests.get(url)<\/p>\n<p>print(response.text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>1.2\u3001BeautifulSoup\u5e93<\/h4>\n<\/p>\n<p><p>BeautifulSoup\u5e93\u7528\u4e8e\u89e3\u6790HTML\u548cXML\u6587\u6863\uff0c\u5e76\u63d0\u53d6\u6240\u9700\u7684\u6570\u636e\u3002\u5b83\u63d0\u4f9b\u4e86\u7b80\u6d01\u7684API\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u8fdb\u884c\u7f51\u9875\u89e3\u6790\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bs4 import BeautifulSoup<\/p>\n<p>html_doc = &quot;&quot;&quot;<\/p>\n<p>&lt;html&gt;&lt;head&gt;&lt;title&gt;The Dormouse&#39;s story&lt;\/title&gt;&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>&lt;p class=&quot;title&quot;&gt;&lt;b&gt;The Dormouse&#39;s story&lt;\/b&gt;&lt;\/p&gt;<\/p>\n<p>&lt;\/body&gt;&lt;\/html&gt;<\/p>\n<p>&quot;&quot;&quot;<\/p>\n<p>soup = BeautifulSoup(html_doc, &#39;html.parser&#39;)<\/p>\n<p>print(soup.title.string)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>1.3\u3001Urllib\u5e93<\/h4>\n<\/p>\n<p><p>Urllib\u5e93\u5305\u542b\u8bb8\u591a\u7528\u4e8e\u5904\u7406URL\u7684\u6a21\u5757\uff0c\u53ef\u4ee5\u7528\u6765\u4e0b\u8f7d\u6587\u4ef6\uff0c\u5305\u62ec\u56fe\u7247\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import urllib.request<\/p>\n<p>url = &quot;http:\/\/example.com\/image.jpg&quot;<\/p>\n<p>urllib.request.urlretrieve(url, &quot;image.jpg&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u5904\u7406\u53cd\u722c\u673a\u5236<\/h3>\n<\/p>\n<p><p>\u8bb8\u591a\u7f51\u7ad9\u4e3a\u4e86\u9632\u6b62\u88ab\u722c\u866b\u6293\u53d6\uff0c\u90fd\u4f1a\u8bbe\u7f6e\u4e00\u4e9b\u53cd\u722c\u673a\u5236\uff0c\u5982<strong>\u9a8c\u8bc1\u7801\u3001IP\u9650\u5236\u3001\u8bf7\u6c42\u5934\u68c0\u6d4b<\/strong>\u7b49\u3002\u6211\u4eec\u9700\u8981\u91c7\u53d6\u4e00\u4e9b\u63aa\u65bd\u6765\u7ed5\u8fc7\u8fd9\u4e9b\u53cd\u722c\u673a\u5236\u3002<\/p>\n<\/p>\n<p><h4>2.1\u3001\u8bbe\u7f6e\u8bf7\u6c42\u5934<\/h4>\n<\/p>\n<p><p>\u8bb8\u591a\u7f51\u7ad9\u4f1a\u68c0\u67e5\u8bf7\u6c42\u5934\u4e2d\u7684User-Agent\u5b57\u6bb5\uff0c\u4ee5\u5224\u65ad\u8bf7\u6c42\u662f\u5426\u6765\u81ea\u6d4f\u89c8\u5668\u3002\u6211\u4eec\u53ef\u4ee5\u5728\u53d1\u9001\u8bf7\u6c42\u65f6\uff0c\u8bbe\u7f6e\u4e00\u4e2a\u5e38\u89c1\u7684User-Agent\uff0c\u4ee5\u7ed5\u8fc7\u8fd9\u79cd\u68c0\u67e5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">headers = {<\/p>\n<p>    &quot;User-Agent&quot;: &quot;Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/87.0.4280.88 Safari\/537.36&quot;<\/p>\n<p>}<\/p>\n<p>response = requests.get(url, headers=headers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2.2\u3001\u4f7f\u7528\u4ee3\u7406<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u7f51\u7ad9\u5bf9IP\u8fdb\u884c\u4e86\u9650\u5236\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee3\u7406\u670d\u52a1\u5668\u6765\u9690\u85cf\u771f\u5b9eIP\u3002\u53ef\u4ee5\u901a\u8fc7\u514d\u8d39\u4ee3\u7406\u7f51\u7ad9\u83b7\u53d6\u4ee3\u7406IP\uff0c\u6216\u8005\u4f7f\u7528\u4ed8\u8d39\u4ee3\u7406\u670d\u52a1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">proxies = {<\/p>\n<p>    &quot;http&quot;: &quot;http:\/\/10.10.1.10:3128&quot;,<\/p>\n<p>    &quot;https&quot;: &quot;http:\/\/10.10.1.10:1080&quot;,<\/p>\n<p>}<\/p>\n<p>response = requests.get(url, headers=headers, proxies=proxies)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u89e3\u6790\u7f51\u9875\u5185\u5bb9<\/h3>\n<\/p>\n<p><p>\u89e3\u6790\u7f51\u9875\u5185\u5bb9\u7684\u5173\u952e\u662f\u627e\u5230\u5305\u542b\u56fe\u7247URL\u7684\u6807\u7b7e\uff0c\u5e76\u63d0\u53d6\u51fa\u56fe\u7247\u7684URL\u3002\u901a\u5e38\uff0c\u56fe\u7247\u7684URL\u4f1a\u5305\u542b\u5728<code>&lt;img&gt;<\/code>\u6807\u7b7e\u7684<code>src<\/code>\u5c5e\u6027\u4e2d\u3002<\/p>\n<\/p>\n<p><h4>3.1\u3001\u4f7f\u7528BeautifulSoup\u89e3\u6790HTML<\/h4>\n<\/p>\n<p><p>BeautifulSoup\u53ef\u4ee5\u65b9\u4fbf\u5730\u89e3\u6790HTML\u6587\u6863\uff0c\u5e76\u63d0\u53d6\u6240\u9700\u7684\u6570\u636e\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u67e5\u627e\u6240\u6709\u7684<code>&lt;img&gt;<\/code>\u6807\u7b7e\uff0c\u5e76\u83b7\u53d6\u5b83\u4eec\u7684<code>src<\/code>\u5c5e\u6027\u6765\u83b7\u53d6\u56fe\u7247\u7684URL\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">html = response.text<\/p>\n<p>soup = BeautifulSoup(html, &#39;html.parser&#39;)<\/p>\n<p>img_tags = soup.find_all(&#39;img&#39;)<\/p>\n<p>urls = [img[&#39;src&#39;] for img in img_tags if &#39;src&#39; in img.attrs]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u4fdd\u5b58\u56fe\u7247<\/h3>\n<\/p>\n<p><p>\u83b7\u53d6\u5230\u56fe\u7247\u7684URL\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528<code>urllib<\/code>\u5e93\u5c06\u56fe\u7247\u4e0b\u8f7d\u5230\u672c\u5730\u3002<\/p>\n<\/p>\n<p><h4>4.1\u3001\u4f7f\u7528Urllib\u4e0b\u8f7d\u56fe\u7247<\/h4>\n<\/p>\n<p><p>Urllib\u63d0\u4f9b\u4e86<code>urlretrieve<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06URL\u5bf9\u5e94\u7684\u6587\u4ef6\u4e0b\u8f7d\u5230\u672c\u5730\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">for url in urls:<\/p>\n<p>    filename = url.split(&#39;\/&#39;)[-1]<\/p>\n<p>    urllib.request.urlretrieve(url, filename)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b<\/h3>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u4ee3\u7801\u793a\u4f8b\uff0c\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528Python\u7f51\u7edc\u722c\u866b\u722c\u53d6\u5927\u91cf\u56fe\u7247\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>from bs4 import BeautifulSoup<\/p>\n<p>import urllib.request<\/p>\n<p>import os<\/p>\n<p>def fetch_image_urls(url):<\/p>\n<p>    headers = {<\/p>\n<p>        &quot;User-Agent&quot;: &quot;Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/87.0.4280.88 Safari\/537.36&quot;<\/p>\n<p>    }<\/p>\n<p>    response = requests.get(url, headers=headers)<\/p>\n<p>    html = response.text<\/p>\n<p>    soup = BeautifulSoup(html, &#39;html.parser&#39;)<\/p>\n<p>    img_tags = soup.find_all(&#39;img&#39;)<\/p>\n<p>    urls = [img[&#39;src&#39;] for img in img_tags if &#39;src&#39; in img.attrs]<\/p>\n<p>    return urls<\/p>\n<p>def save_images(urls, folder):<\/p>\n<p>    if not os.path.exists(folder):<\/p>\n<p>        os.makedirs(folder)<\/p>\n<p>    for url in urls:<\/p>\n<p>        try:<\/p>\n<p>            filename = os.path.join(folder, url.split(&#39;\/&#39;)[-1])<\/p>\n<p>            urllib.request.urlretrieve(url, filename)<\/p>\n<p>            print(f&quot;Downloaded {filename}&quot;)<\/p>\n<p>        except Exception as e:<\/p>\n<p>            print(f&quot;F<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>led to download {url}: {e}&quot;)<\/p>\n<p>if __name__ == &quot;__main__&quot;:<\/p>\n<p>    website_url = &quot;http:\/\/example.com&quot;<\/p>\n<p>    image_folder = &quot;downloaded_images&quot;<\/p>\n<p>    image_urls = fetch_image_urls(website_url)<\/p>\n<p>    save_images(image_urls, image_folder)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5904\u7406\u5e38\u89c1\u95ee\u9898<\/h3>\n<\/p>\n<p><h4>6.1\u3001\u5904\u7406\u76f8\u5bf9\u8def\u5f84<\/h4>\n<\/p>\n<p><p>\u6709\u4e9b\u56fe\u7247\u7684URL\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u9700\u8981\u5c06\u5176\u8f6c\u6362\u4e3a\u7edd\u5bf9\u8def\u5f84\u3002\u53ef\u4ee5\u4f7f\u7528<code>urllib.parse<\/code>\u6a21\u5757\u4e2d\u7684<code>urljoin<\/code>\u51fd\u6570\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from urllib.parse import urljoin<\/p>\n<p>base_url = &quot;http:\/\/example.com&quot;<\/p>\n<p>urls = [urljoin(base_url, img[&#39;src&#39;]) for img in img_tags if &#39;src&#39; in img.attrs]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>6.2\u3001\u5904\u7406\u52a8\u6001\u52a0\u8f7d\u7684\u56fe\u7247<\/h4>\n<\/p>\n<p><p>\u6709\u4e9b\u7f51\u7ad9\u7684\u56fe\u7247\u662f\u901a\u8fc7JavaScript\u52a8\u6001\u52a0\u8f7d\u7684\uff0c\u4f7f\u7528\u666e\u901a\u7684\u8bf7\u6c42\u65b9\u6cd5\u65e0\u6cd5\u83b7\u53d6\u5230\u56fe\u7247URL\u3002\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528Selenium\u5e93\u6765\u6a21\u62df\u6d4f\u89c8\u5668\u64cd\u4f5c\uff0c\u5e76\u83b7\u53d6\u52a8\u6001\u52a0\u8f7d\u7684\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<p>driver = webdriver.Chrome()<\/p>\n<p>driver.get(website_url)<\/p>\n<p>html = driver.page_source<\/p>\n<p>soup = BeautifulSoup(html, &#39;html.parser&#39;)<\/p>\n<p>img_tags = soup.find_all(&#39;img&#39;)<\/p>\n<p>urls = [img[&#39;src&#39;] for img in img_tags if &#39;src&#39; in img.attrs]<\/p>\n<p>driver.quit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Python\u7f51\u7edc\u722c\u866b\u722c\u53d6\u5927\u91cf\u56fe\u7247\u7684\u8fc7\u7a0b\u6d89\u53ca\u9009\u62e9\u5408\u9002\u7684\u5e93\u3001\u5904\u7406\u53cd\u722c\u673a\u5236\u3001\u89e3\u6790\u7f51\u9875\u5185\u5bb9\u548c\u4fdd\u5b58\u56fe\u7247\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8fd8\u9700\u8981\u6839\u636e\u5177\u4f53\u60c5\u51b5\u5904\u7406\u76f8\u5bf9\u8def\u5f84\u3001\u52a8\u6001\u52a0\u8f7d\u7b49\u95ee\u9898\u3002\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\u548c\u4ee3\u7801\u793a\u4f8b\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u638c\u63e1\u57fa\u672c\u7684\u56fe\u7247\u722c\u53d6\u6280\u5de7\uff0c\u5e76\u6839\u636e\u9700\u8981\u8fdb\u884c\u6269\u5c55\u548c\u4f18\u5316\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684Python\u5e93\u6765\u722c\u53d6\u56fe\u7247\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u56fe\u7247\u722c\u53d6\u65f6\uff0c\u63a8\u8350\u4f7f\u7528\u5982Requests\u548cBeautiful Soup\u8fd9\u4e24\u79cd\u5e93\u3002Requests\u5e93\u7528\u4e8e\u53d1\u9001HTTP\u8bf7\u6c42\uff0c\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff0c\u800cBeautiful Soup\u5219\u53ef\u4ee5\u5e2e\u52a9\u89e3\u6790HTML\u6587\u6863\uff0c\u63d0\u53d6\u51fa\u56fe\u7247\u7684URL\u3002\u8fd8\u6709Scrapy\u6846\u67b6\uff0c\u5b83\u9002\u5408\u5927\u89c4\u6a21\u722c\u53d6\u5e76\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u529f\u80fd\u3002<\/p>\n<p><strong>\u722c\u53d6\u56fe\u7247\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u6cd5\u5f8b\u548c\u9053\u5fb7\u95ee\u9898\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u56fe\u7247\u722c\u53d6\u65f6\uff0c\u52a1\u5fc5\u9075\u5faa\u7f51\u7ad9\u7684robots.txt\u6587\u4ef6\u4e2d\u7684\u722c\u866b\u534f\u8bae\uff0c\u786e\u4fdd\u4e0d\u8fdd\u53cd\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\u3002\u540c\u65f6\uff0c\u8981\u8003\u8651\u7248\u6743\u95ee\u9898\uff0c\u5c3d\u91cf\u907f\u514d\u4e0b\u8f7d\u53d7\u7248\u6743\u4fdd\u62a4\u7684\u56fe\u7247\u3002\u5982\u679c\u9700\u8981\u4f7f\u7528\u8fd9\u4e9b\u56fe\u7247\uff0c\u6700\u597d\u8054\u7cfb\u7248\u6743\u6240\u6709\u8005\u83b7\u53d6\u8bb8\u53ef\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u722c\u53d6\u8fc7\u7a0b\u4e2d\u9047\u5230\u7684\u53cd\u722c\u673a\u5236\uff1f<\/strong><br \/>\u8bb8\u591a\u7f51\u7ad9\u4f1a\u6709\u53cd\u722c\u866b\u673a\u5236\u6765\u963b\u6b62\u81ea\u52a8\u5316\u7a0b\u5e8f\u8bbf\u95ee\u3002\u53ef\u4ee5\u901a\u8fc7\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\uff0c\u6bd4\u5982\u8bbe\u7f6e\u968f\u673a\u7684User-Agent\u3001\u4f7f\u7528\u4ee3\u7406IP\u3001\u6dfb\u52a0\u5ef6\u8fdf\u7b49\u65b9\u5f0f\u6765\u964d\u4f4e\u88ab\u5c01\u7981\u7684\u98ce\u9669\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u52a8\u6001\u722c\u866b\u5de5\u5177\uff0c\u4f8b\u5982Selenium\uff0c\u6765\u5904\u7406\u9700\u8981JavaScript\u52a0\u8f7d\u7684\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u7528Python\u7f51\u7edc\u722c\u866b\u722c\u53d6\u5927\u91cf\u56fe\u7247 \u4f7f\u7528Python\u7f51\u7edc\u722c\u866b\u722c\u53d6\u5927\u91cf\u56fe\u7247\u7684\u5173\u952e\u662f\u9009\u62e9\u5408\u9002\u7684\u5e93\u3001\u5904\u7406\u53cd\u722c\u673a\u5236 [&hellip;]","protected":false},"author":3,"featured_media":1108527,"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\/1108517"}],"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=1108517"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1108517\/revisions"}],"predecessor-version":[{"id":1108529,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1108517\/revisions\/1108529"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1108527"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1108517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1108517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1108517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}