{"id":1113154,"date":"2025-01-08T17:45:07","date_gmt":"2025-01-08T09:45:07","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1113154.html"},"modified":"2025-01-08T17:45:09","modified_gmt":"2025-01-08T09:45:09","slug":"%e5%a6%82%e4%bd%95%e4%bb%8epython%e7%88%ac%e5%8f%96%e6%9f%90%e5%ae%9d%e7%bd%91%e7%ab%99%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1113154.html","title":{"rendered":"\u5982\u4f55\u4ecepython\u722c\u53d6\u67d0\u5b9d\u7f51\u7ad9\u6570\u636e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25074903\/f022e41b-4cc7-417d-85bc-f815295835e9.webp\" alt=\"\u5982\u4f55\u4ecepython\u722c\u53d6\u67d0\u5b9d\u7f51\u7ad9\u6570\u636e\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u4ecePython\u722c\u53d6\u67d0\u5b9d\u7f51\u7ad9\u6570\u636e<\/strong><\/p>\n<\/p>\n<p><p>\u722c\u53d6\u6dd8\u5b9d\u7f51\u7ad9\u6570\u636e\u7684\u6838\u5fc3\u65b9\u6cd5\u5305\u62ec\uff1a<strong>\u4f7f\u7528Selenium\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\u3001\u4f7f\u7528requests\u5e93\u53d1\u9001HTTP\u8bf7\u6c42\u3001\u4f7f\u7528BeautifulSoup\u89e3\u6790\u7f51\u9875\u5185\u5bb9<\/strong>\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u91cd\u70b9\u8ba8\u8bba\u5982\u4f55\u4f7f\u7528Selenium\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\u6765\u722c\u53d6\u6dd8\u5b9d\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>Selenium \u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u5b83\u80fd\u591f\u6a21\u62df\u7528\u6237\u5728\u6d4f\u89c8\u5668\u4e0a\u7684\u64cd\u4f5c\uff0c\u6bd4\u5982\u70b9\u51fb\u3001\u8f93\u5165\u6587\u5b57\u7b49\u3002\u5bf9\u4e8e\u6dd8\u5b9d\u8fd9\u6837\u7684\u7f51\u7ad9\uff0c\u5b83\u4eec\u901a\u5e38\u4f1a\u4f7f\u7528\u52a8\u6001\u52a0\u8f7d\u7684\u6280\u672f\uff0c\u7b80\u5355\u7684HTTP\u8bf7\u6c42\u96be\u4ee5\u83b7\u53d6\u5230\u5b8c\u6574\u7684\u9875\u9762\u5185\u5bb9\uff0c\u800c\u4f7f\u7528Selenium\u5219\u53ef\u4ee5\u7ed5\u8fc7\u8fd9\u4e9b\u9650\u5236\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001Selenium\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a<\/p>\n<\/p>\n<p><p>\u4f7f\u7528Selenium\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\uff0c\u6211\u4eec\u53ef\u4ee5\u50cf\u6b63\u5e38\u7528\u6237\u4e00\u6837\u8bbf\u95ee\u6dd8\u5b9d\u7f51\uff0c\u5e76\u4e14\u6a21\u62df\u7528\u6237\u7684\u5404\u79cd\u64cd\u4f5c\uff0c\u6bd4\u5982\u767b\u5f55\u3001\u641c\u7d22\u3001\u7ffb\u9875\u7b49\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u83b7\u53d6\u5230\u6240\u9700\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>1\u3001\u5b89\u88c5\u5e76\u8bbe\u7f6eSelenium<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5Selenium\u548c\u6d4f\u89c8\u5668\u9a71\u52a8\uff08\u4ee5Chrome\u4e3a\u4f8b\uff09\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\u76f8\u5e94\u7684ChromeDriver\uff0c\u653e\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002<\/p>\n<\/p>\n<p><p>2\u3001\u6a21\u62df\u767b\u5f55\u6dd8\u5b9d<\/p>\n<\/p>\n<p><p>\u6dd8\u5b9d\u5bf9\u672a\u767b\u5f55\u7528\u6237\u7684\u6570\u636e\u8bbf\u95ee\u6709\u5f88\u591a\u9650\u5236\uff0c\u56e0\u6b64\u6211\u4eec\u901a\u5e38\u9700\u8981\u6a21\u62df\u7528\u6237\u767b\u5f55\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<p>import time<\/p>\n<h2><strong>\u8bbe\u7f6eChrome\u6d4f\u89c8\u5668<\/strong><\/h2>\n<p>options = webdriver.ChromeOptions()<\/p>\n<p>options.add_argument(&quot;--start-maximized&quot;)<\/p>\n<p>driver = webdriver.Chrome(chrome_options=options)<\/p>\n<h2><strong>\u8bbf\u95ee\u6dd8\u5b9d\u767b\u5f55\u9875<\/strong><\/h2>\n<p>driver.get(&quot;https:\/\/login.taobao.com&quot;)<\/p>\n<h2><strong>\u7b49\u5f85\u7528\u6237\u624b\u52a8\u626b\u7801\u767b\u5f55<\/strong><\/h2>\n<p>time.sleep(30)  # \u8fd9\u91cc\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u8981\u8c03\u6574\u7b49\u5f85\u65f6\u95f4<\/p>\n<h2><strong>\u767b\u5f55\u6210\u529f\u540e\uff0c\u7ee7\u7eed\u5176\u4ed6\u64cd\u4f5c<\/strong><\/h2>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u6210\u529f\u767b\u5f55\u5230\u6dd8\u5b9d\u7f51\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u641c\u7d22\u5e76\u83b7\u53d6\u5546\u54c1\u6570\u636e<\/p>\n<\/p>\n<p><p>\u767b\u5f55\u6210\u529f\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7Selenium\u6a21\u62df\u641c\u7d22\u64cd\u4f5c\uff0c\u5e76\u89e3\u6790\u641c\u7d22\u7ed3\u679c\u9875\u9762\u6765\u83b7\u53d6\u5546\u54c1\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>1\u3001\u6a21\u62df\u641c\u7d22\u64cd\u4f5c<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5728\u641c\u7d22\u6846\u4e2d\u8f93\u5165\u5173\u952e\u8bcd<\/p>\n<p>search_box = driver.find_element_by_id(&quot;q&quot;)<\/p>\n<p>search_box.send_keys(&quot;iPhone&quot;)<\/p>\n<h2><strong>\u70b9\u51fb\u641c\u7d22\u6309\u94ae<\/strong><\/h2>\n<p>search_button = driver.find_element_by_class_name(&quot;btn-search&quot;)<\/p>\n<p>search_button.click()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>2\u3001\u89e3\u6790\u641c\u7d22\u7ed3\u679c\u9875\u9762<\/p>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528BeautifulSoup\u89e3\u6790\u641c\u7d22\u7ed3\u679c\u9875\u9762\uff0c\u63d0\u53d6\u5546\u54c1\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bs4 import BeautifulSoup<\/p>\n<h2><strong>\u83b7\u53d6\u641c\u7d22\u7ed3\u679c\u9875\u9762\u7684HTML\u5185\u5bb9<\/strong><\/h2>\n<p>html = driver.page_source<\/p>\n<h2><strong>\u4f7f\u7528BeautifulSoup\u89e3\u6790HTML<\/strong><\/h2>\n<p>soup = BeautifulSoup(html, &quot;html.parser&quot;)<\/p>\n<h2><strong>\u63d0\u53d6\u5546\u54c1\u4fe1\u606f<\/strong><\/h2>\n<p>items = soup.find_all(class_=&quot;item&quot;)<\/p>\n<p>for item in items:<\/p>\n<p>    title = item.find(class_=&quot;title&quot;).text.strip()<\/p>\n<p>    price = item.find(class_=&quot;price&quot;).text.strip()<\/p>\n<p>    shop = item.find(class_=&quot;shop&quot;).text.strip()<\/p>\n<p>    print(f&quot;\u5546\u54c1\u540d\u79f0: {title}, \u4ef7\u683c: {price}, \u5e97\u94fa: {shop}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u5904\u7406\u7ffb\u9875<\/p>\n<\/p>\n<p><p>\u5728\u83b7\u53d6\u4e86\u7b2c\u4e00\u9875\u7684\u641c\u7d22\u7ed3\u679c\u540e\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u5904\u7406\u7ffb\u9875\u64cd\u4f5c\uff0c\u4ee5\u83b7\u53d6\u66f4\u591a\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>1\u3001\u6a21\u62df\u7ffb\u9875\u64cd\u4f5c<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u627e\u5230\u4e0b\u4e00\u9875\u6309\u94ae\u5e76\u70b9\u51fb<\/p>\n<p>next_button = driver.find_element_by_class_name(&quot;next&quot;)<\/p>\n<p>next_button.click()<\/p>\n<h2><strong>\u7b49\u5f85\u9875\u9762\u52a0\u8f7d\u5b8c\u6210<\/strong><\/h2>\n<p>time.sleep(5)<\/p>\n<h2><strong>\u83b7\u53d6\u4e0b\u4e00\u9875\u7684\u641c\u7d22\u7ed3\u679c\u5e76\u89e3\u6790<\/strong><\/h2>\n<p>html = driver.page_source<\/p>\n<p>soup = BeautifulSoup(html, &quot;html.parser&quot;)<\/p>\n<h2><strong>\u7ee7\u7eed\u63d0\u53d6\u5546\u54c1\u4fe1\u606f<\/strong><\/h2>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u5faa\u73af\u70b9\u51fb\u4e0b\u4e00\u9875\u6309\u94ae\uff0c\u53ef\u4ee5\u83b7\u53d6\u5230\u6240\u6709\u641c\u7d22\u7ed3\u679c\u9875\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4fdd\u5b58\u6570\u636e<\/p>\n<\/p>\n<p><p>\u5728\u83b7\u53d6\u5230\u5546\u54c1\u6570\u636e\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u5176\u4fdd\u5b58\u5230\u672c\u5730\u6587\u4ef6\u6216\u6570\u636e\u5e93\u4e2d\uff0c\u4fbf\u4e8e\u540e\u7eed\u5206\u6790\u548c\u4f7f\u7528\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u5c06\u6570\u636e\u4fdd\u5b58\u5230CSV\u6587\u4ef6\u4e2d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import csv<\/p>\n<h2><strong>\u6253\u5f00\u6587\u4ef6\uff0c\u51c6\u5907\u5199\u5165<\/strong><\/h2>\n<p>with open(&quot;taobao_items.csv&quot;, &quot;w&quot;, newline=&quot;&quot;, encoding=&quot;utf-8&quot;) as csvfile:<\/p>\n<p>    fieldnames = [&quot;\u5546\u54c1\u540d\u79f0&quot;, &quot;\u4ef7\u683c&quot;, &quot;\u5e97\u94fa&quot;]<\/p>\n<p>    writer = csv.DictWriter(csvfile, fieldnames=fieldnames)<\/p>\n<p>    # \u5199\u5165\u8868\u5934<\/p>\n<p>    writer.writeheader()<\/p>\n<p>    # \u5199\u5165\u5546\u54c1\u6570\u636e<\/p>\n<p>    for item in items:<\/p>\n<p>        title = item.find(class_=&quot;title&quot;).text.strip()<\/p>\n<p>        price = item.find(class_=&quot;price&quot;).text.strip()<\/p>\n<p>        shop = item.find(class_=&quot;shop&quot;).text.strip()<\/p>\n<p>        writer.writerow({&quot;\u5546\u54c1\u540d\u79f0&quot;: title, &quot;\u4ef7\u683c&quot;: price, &quot;\u5e97\u94fa&quot;: shop})<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u53cd\u722c\u866b\u4e0e\u5e94\u5bf9\u7b56\u7565<\/p>\n<\/p>\n<p><p>\u6dd8\u5b9d\u7b49\u5927\u578b\u7535\u5546\u7f51\u7ad9\u901a\u5e38\u4f1a\u6709\u53cd\u722c\u866b\u673a\u5236\uff0c\u6bd4\u5982\u9a8c\u8bc1\u7801\u3001IP\u5c01\u7981\u7b49\u3002\u4e3a\u4e86\u5e94\u5bf9\u8fd9\u4e9b\u53cd\u722c\u866b\u673a\u5236\uff0c\u6211\u4eec\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u7b56\u7565\uff1a<\/p>\n<\/p>\n<p><p>1\u3001<strong>\u4f7f\u7528\u4ee3\u7406IP<\/strong>\uff1a\u901a\u8fc7\u4f7f\u7528\u4ee3\u7406IP\u6c60\uff0c\u53ef\u4ee5\u907f\u514d\u5355\u4e2aIP\u9891\u7e41\u8bbf\u95ee\u5bfc\u81f4\u7684\u5c01\u7981\u3002<\/p>\n<p>2\u3001<strong>\u8bbe\u7f6e\u5408\u7406\u7684\u8bf7\u6c42\u95f4\u9694<\/strong>\uff1a\u901a\u8fc7\u8bbe\u7f6e\u5408\u7406\u7684\u8bf7\u6c42\u95f4\u9694\uff0c\u6a21\u62df\u6b63\u5e38\u7528\u6237\u7684\u64cd\u4f5c\uff0c\u51cf\u5c11\u88ab\u8bc6\u522b\u4e3a\u722c\u866b\u7684\u98ce\u9669\u3002<\/p>\n<p>3\u3001<strong>\u6a21\u62df\u4eba\u7c7b\u884c\u4e3a<\/strong>\uff1a\u901a\u8fc7\u968f\u673a\u70b9\u51fb\u3001\u6ed1\u52a8\u7b49\u64cd\u4f5c\uff0c\u8fdb\u4e00\u6b65\u6a21\u62df\u4eba\u7c7b\u884c\u4e3a\uff0c\u7ed5\u8fc7\u53cd\u722c\u866b\u673a\u5236\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528\u4ee3\u7406IP\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium.webdriver.common.proxy import Proxy, ProxyType<\/p>\n<h2><strong>\u8bbe\u7f6e\u4ee3\u7406IP<\/strong><\/h2>\n<p>proxy = Proxy()<\/p>\n<p>proxy.proxy_type = ProxyType.MANUAL<\/p>\n<p>proxy.http_proxy = &quot;http:\/\/your_proxy_ip:port&quot;<\/p>\n<p>proxy.add_to_capabilities(options)<\/p>\n<h2><strong>\u542f\u52a8\u6d4f\u89c8\u5668<\/strong><\/h2>\n<p>driver = webdriver.Chrome(chrome_options=options)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u6709\u6548\u5730\u5e94\u5bf9\u53cd\u722c\u866b\u673a\u5236\uff0c\u63d0\u9ad8\u6570\u636e\u722c\u53d6\u7684\u6210\u529f\u7387\u3002<\/p>\n<\/p>\n<p><p>\u603b\u4e4b\uff0c\u901a\u8fc7\u4f7f\u7528Selenium\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\uff0c\u6211\u4eec\u53ef\u4ee5\u6210\u529f\u5730\u4ece\u6dd8\u5b9d\u7f51\u7ad9\u722c\u53d6\u6240\u9700\u7684\u6570\u636e\u3002\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u6839\u636e\u5177\u4f53\u60c5\u51b5\u8c03\u6574\u4ee3\u7801\uff0c\u4ee5\u5e94\u5bf9\u4e0d\u540c\u7684\u53cd\u722c\u866b\u673a\u5236\u548c\u6570\u636e\u7ed3\u6784\u3002\u540c\u65f6\uff0c\u52a1\u5fc5\u9075\u5b88\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u548c\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\uff0c\u5408\u7406\u4f7f\u7528\u722c\u53d6\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u9002\u5408\u7684Python\u5e93\u8fdb\u884c\u6570\u636e\u722c\u53d6\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u67d0\u5b9d\u7f51\u7ad9\u6570\u636e\u722c\u53d6\u65f6\uff0c\u9009\u62e9\u5408\u9002\u7684Python\u5e93\u81f3\u5173\u91cd\u8981\u3002\u5e38\u7528\u7684\u5e93\u5305\u62ecRequests\u3001BeautifulSoup\u548cScrapy\u3002Requests\u7528\u4e8e\u53d1\u9001HTTP\u8bf7\u6c42\uff0c\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff1bBeautifulSoup\u5219\u8d1f\u8d23\u89e3\u6790HTML\u6587\u6863\uff0c\u63d0\u53d6\u6240\u9700\u6570\u636e\uff1b\u800cScrapy\u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684\u722c\u866b\u6846\u67b6\uff0c\u9002\u5408\u9700\u8981\u5904\u7406\u5927\u91cf\u6570\u636e\u7684\u590d\u6742\u9879\u76ee\u3002\u6839\u636e\u5177\u4f53\u9700\u6c42\uff0c\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u53ef\u4ee5\u63d0\u9ad8\u722c\u53d6\u6548\u7387\u3002<\/p>\n<p><strong>\u722c\u53d6\u67d0\u5b9d\u7f51\u7ad9\u6570\u636e\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u6cd5\u5f8b\u95ee\u9898\uff1f<\/strong><br \/>\u5728\u722c\u53d6\u67d0\u5b9d\u7f51\u7ad9\u6570\u636e\u4e4b\u524d\uff0c\u4e86\u89e3\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u975e\u5e38\u91cd\u8981\u3002\u67d0\u5b9d\u7684\u7528\u6237\u534f\u8bae\u901a\u5e38\u7981\u6b62\u672a\u7ecf\u6388\u6743\u7684\u6570\u636e\u722c\u53d6\u884c\u4e3a\uff0c\u56e0\u6b64\u5728\u8fdb\u884c\u6570\u636e\u6293\u53d6\u65f6\uff0c\u9700\u8981\u786e\u4fdd\u9075\u5faa\u7f51\u7ad9\u7684Robots.txt\u6587\u4ef6\u4e2d\u7684\u89c4\u5b9a\u3002\u6b64\u5916\uff0c\u907f\u514d\u8fc7\u4e8e\u9891\u7e41\u7684\u8bf7\u6c42\uff0c\u4ee5\u9632\u5bf9\u7f51\u7ad9\u9020\u6210\u8d1f\u62c5\uff0c\u5bfc\u81f4IP\u88ab\u5c01\u7981\u3002\u540c\u65f6\uff0c\u786e\u4fdd\u5728\u4f7f\u7528\u722c\u53d6\u6570\u636e\u65f6\u4e0d\u4fb5\u72af\u4ed6\u4eba\u7684\u77e5\u8bc6\u4ea7\u6743\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u722c\u53d6\u8fc7\u7a0b\u4e2d\u9047\u5230\u7684\u53cd\u722c\u866b\u673a\u5236\uff1f<\/strong><br \/>\u67d0\u5b9d\u7f51\u7ad9\u901a\u5e38\u4f1a\u5b9e\u65bd\u591a\u79cd\u53cd\u722c\u866b\u673a\u5236\uff0c\u4f8b\u5982IP\u9650\u5236\u3001\u9a8c\u8bc1\u7801\u548c\u52a8\u6001\u5185\u5bb9\u52a0\u8f7d\u7b49\u3002\u5728\u9047\u5230\u8fd9\u4e9b\u60c5\u51b5\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6765\u5e94\u5bf9\u3002\u4f7f\u7528\u4ee3\u7406IP\u53ef\u4ee5\u6709\u6548\u907f\u514dIP\u88ab\u5c01\u7981\uff0c\u5b9a\u65f6\u8bf7\u6c42\u5219\u53ef\u4ee5\u51cf\u5c11\u9891\u7387\u5bfc\u81f4\u7684\u98ce\u9669\u3002\u6b64\u5916\uff0c\u4f7f\u7528\u6a21\u62df\u7528\u6237\u884c\u4e3a\u7684\u65b9\u5f0f\uff0c\u4f8b\u5982\u968f\u673a\u8bbe\u7f6e\u8bf7\u6c42\u5934\u3001\u5ef6\u8fdf\u8bf7\u6c42\u7b49\uff0c\u80fd\u591f\u63d0\u9ad8\u722c\u53d6\u6210\u529f\u7387\u3002\u540c\u65f6\uff0c\u7ed3\u5408\u4f7f\u7528\u81ea\u52a8\u5316\u5de5\u5177\uff0c\u5982Selenium\uff0c\u53ef\u4ee5\u5904\u7406\u52a8\u6001\u52a0\u8f7d\u7684\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u4ecePython\u722c\u53d6\u67d0\u5b9d\u7f51\u7ad9\u6570\u636e \u722c\u53d6\u6dd8\u5b9d\u7f51\u7ad9\u6570\u636e\u7684\u6838\u5fc3\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528Selenium\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\u3001\u4f7f\u7528r [&hellip;]","protected":false},"author":3,"featured_media":1113162,"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\/1113154"}],"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=1113154"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1113154\/revisions"}],"predecessor-version":[{"id":1113165,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1113154\/revisions\/1113165"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1113162"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1113154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1113154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1113154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}