{"id":1115960,"date":"2025-01-08T18:11:49","date_gmt":"2025-01-08T10:11:49","guid":{"rendered":""},"modified":"2025-01-08T18:11:52","modified_gmt":"2025-01-08T10:11:52","slug":"python%e5%a6%82%e4%bd%95%e7%88%ac%e5%8f%96%e5%be%ae%e4%bf%a1%e5%85%ac%e4%bc%97%e5%8f%b7%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1115960.html","title":{"rendered":"python\u5982\u4f55\u722c\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u6570\u636e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25080507\/f075a9bc-f5e1-4645-84ed-bbf869732aff.webp\" alt=\"python\u5982\u4f55\u722c\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u6570\u636e\" \/><\/p>\n<p><p> <strong>Python\u722c\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u6570\u636e\u7684\u65b9\u6cd5\u6709\u4f7f\u7528\u5fae\u4fe1\u5b98\u65b9\u63a5\u53e3\u3001\u5229\u7528\u7b2c\u4e09\u65b9\u5de5\u5177\u3001\u6a21\u62df\u6d4f\u89c8\u5668\u64cd\u4f5c\u3001\u4f7f\u7528\u722c\u866b\u6846\u67b6\u7b49\u3002\u6a21\u62df\u6d4f\u89c8\u5668\u64cd\u4f5c\u662f\u6bd4\u8f83\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u901a\u8fc7selenium\u5e93\u6765\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\uff0c\u8fdb\u884c\u6570\u636e\u6293\u53d6\u3002\u4e0b\u9762\u5c31\u8be6\u7ec6\u63cf\u8ff0\u8fd9\u79cd\u65b9\u6cd5\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u6a21\u62df\u6d4f\u89c8\u5668\u64cd\u4f5c\u6765\u722c\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u6570\u636e\uff0c\u4e3b\u8981\u662f\u5229\u7528selenium\u5e93\u6765\u63a7\u5236\u6d4f\u89c8\u5668\u8fdb\u884c\u7f51\u9875\u64cd\u4f5c\uff0c\u6293\u53d6\u6240\u9700\u6570\u636e\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5selenium\u548c\u6d4f\u89c8\u5668\u9a71\u52a8<\/h3>\n<\/p>\n<ol>\n<li>\u5b89\u88c5selenium\u5e93<\/li>\n<\/ol>\n<p><pre><code class=\"language-bash\">pip install selenium<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u4e0b\u8f7d\u4e0e\u6d4f\u89c8\u5668\u7248\u672c\u5339\u914d\u7684\u9a71\u52a8\u7a0b\u5e8f\uff08\u5982Chrome\u7684chromedriver\u6216Firefox\u7684geckodriver\uff09\uff0c\u5e76\u5c06\u5176\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002\u6bd4\u5982\uff0c\u4f7f\u7528Chrome\u6d4f\u89c8\u5668\uff0c\u5219\u9700\u4e0b\u8f7d\u76f8\u5e94\u7248\u672c\u7684chromedriver\u3002<\/li>\n<\/ol>\n<p><h3>\u4e8c\u3001\u5bfc\u5165\u5e93\u5e76\u521d\u59cb\u5316\u6d4f\u89c8\u5668<\/h3>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<p>from selenium.webdriver.chrome.service import Service<\/p>\n<p>from selenium.webdriver.common.by import By<\/p>\n<p>import time<\/p>\n<h2><strong>\u8bbe\u7f6echromedriver\u8def\u5f84<\/strong><\/h2>\n<p>chrome_driver_path = &#39;\/path\/to\/chromedriver&#39;  # \u8bf7\u66ff\u6362\u4e3a\u5b9e\u9645\u8def\u5f84<\/p>\n<p>service = Service(chrome_driver_path)<\/p>\n<h2><strong>\u521d\u59cb\u5316\u6d4f\u89c8\u5668<\/strong><\/h2>\n<p>driver = webdriver.Chrome(service=service)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u6253\u5f00\u5fae\u4fe1\u516c\u4f17\u53f7\u9875\u9762<\/h3>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8bbf\u95ee\u5fae\u4fe1\u516c\u4f17\u53f7\u6587\u7ae0\u5217\u8868\u9875\u9762<\/p>\n<p>mp_url = &#39;https:\/\/mp.weixin.qq.com&#39;<\/p>\n<p>driver.get(mp_url)<\/p>\n<h2><strong>\u8bbe\u7f6e\u7b49\u5f85\u65f6\u95f4\uff0c\u786e\u4fdd\u9875\u9762\u52a0\u8f7d\u5b8c\u6210<\/strong><\/h2>\n<p>time.sleep(3)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u6a21\u62df\u767b\u5f55\u64cd\u4f5c<\/h3>\n<\/p>\n<p><p>\u7531\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7\u6587\u7ae0\u5217\u8868\u9700\u8981\u767b\u5f55\u5fae\u4fe1\u8d26\u53f7\u624d\u80fd\u8bbf\u95ee\uff0c\u56e0\u6b64\u9700\u8981\u6a21\u62df\u767b\u5f55\u64cd\u4f5c\u3002\u8fd9\u91cc\u5047\u8bbe\u5df2\u7ecf\u83b7\u53d6\u4e86\u5fae\u4fe1\u767b\u5f55\u7684\u4e8c\u7ef4\u7801\uff08\u5b9e\u9645\u64cd\u4f5c\u4e2d\u9700\u8981\u624b\u52a8\u626b\u7801\u767b\u5f55\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u6a21\u62df\u626b\u7801\u767b\u5f55<\/p>\n<p>print(&quot;\u8bf7\u626b\u63cf\u4e8c\u7ef4\u7801\u767b\u5f55\u5fae\u4fe1&quot;)<\/p>\n<h2><strong>\u7b49\u5f85\u7528\u6237\u626b\u7801\u5b8c\u6210<\/strong><\/h2>\n<p>time.sleep(20)  # \u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8c03\u6574\u7b49\u5f85\u65f6\u95f4<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u8bbf\u95ee\u7279\u5b9a\u516c\u4f17\u53f7\u7684\u6587\u7ae0\u5217\u8868<\/h3>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8f93\u5165\u516c\u4f17\u53f7\u540d\u79f0<\/p>\n<p>search_box = driver.find_element(By.XPATH, &#39;\/\/*[@id=&quot;query&quot;]&#39;)<\/p>\n<p>search_box.send_keys(&#39;\u516c\u4f17\u53f7\u540d\u79f0&#39;)  # \u8bf7\u66ff\u6362\u4e3a\u5b9e\u9645\u516c\u4f17\u53f7\u540d\u79f0<\/p>\n<h2><strong>\u70b9\u51fb\u641c\u7d22\u6309\u94ae<\/strong><\/h2>\n<p>search_button = driver.find_element(By.XPATH, &#39;\/\/*[@id=&quot;search_but&quot;]&#39;)<\/p>\n<p>search_button.click()<\/p>\n<h2><strong>\u7b49\u5f85\u641c\u7d22\u7ed3\u679c\u52a0\u8f7d\u5b8c\u6210<\/strong><\/h2>\n<p>time.sleep(3)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u6293\u53d6\u6587\u7ae0\u94fe\u63a5\u548c\u5185\u5bb9<\/h3>\n<\/p>\n<p><pre><code class=\"language-python\"># \u83b7\u53d6\u6587\u7ae0\u94fe\u63a5<\/p>\n<p>articles = driver.find_elements(By.XPATH, &#39;\/\/*[@class=&quot;weui_media_title&quot;]&#39;)<\/p>\n<h2><strong>\u904d\u5386\u6587\u7ae0\u5217\u8868<\/strong><\/h2>\n<p>for article in articles:<\/p>\n<p>    article_title = article.text<\/p>\n<p>    article_link = article.get_attribute(&#39;hrefs&#39;)<\/p>\n<p>    # \u6253\u5370\u6587\u7ae0\u6807\u9898\u548c\u94fe\u63a5<\/p>\n<p>    print(f&quot;\u6807\u9898\uff1a{article_title}&quot;)<\/p>\n<p>    print(f&quot;\u94fe\u63a5\uff1a{article_link}&quot;)<\/p>\n<p>    # \u8bbf\u95ee\u6587\u7ae0\u9875\u9762<\/p>\n<p>    driver.get(article_link)<\/p>\n<p>    # \u7b49\u5f85\u9875\u9762\u52a0\u8f7d\u5b8c\u6210<\/p>\n<p>    time.sleep(2)<\/p>\n<p>    # \u6293\u53d6\u6587\u7ae0\u5185\u5bb9<\/p>\n<p>    article_content = driver.find_element(By.XPATH, &#39;\/\/*[@class=&quot;rich_media_content &quot;]&#39;).text<\/p>\n<p>    # \u6253\u5370\u6587\u7ae0\u5185\u5bb9<\/p>\n<p>    print(f&quot;\u5185\u5bb9\uff1a{article_content}&quot;)<\/p>\n<p>    # \u8fd4\u56de\u6587\u7ae0\u5217\u8868\u9875\u9762<\/p>\n<p>    driver.back()<\/p>\n<p>    time.sleep(2)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u5904\u7406\u53cd\u722c\u866b\u63aa\u65bd<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u5fae\u4fe1\u516c\u4f17\u53f7\u7f51\u7ad9\u53ef\u80fd\u4f1a\u6709\u53cd\u722c\u866b\u63aa\u65bd\uff0c\u56e0\u6b64\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u8bbe\u7f6e\u5408\u7406\u7684\u5ef6\u65f6<\/strong>\uff1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u4e4b\u95f4\u8bbe\u7f6e\u5408\u7406\u7684\u5ef6\u65f6\uff0c\u907f\u514d\u9891\u7e41\u8bbf\u95ee\u89e6\u53d1\u53cd\u722c\u866b\u673a\u5236\u3002<\/li>\n<li><strong>\u6a21\u62df\u771f\u5b9e\u7528\u6237\u884c\u4e3a<\/strong>\uff1a\u4f7f\u7528selenium\u6a21\u62df\u771f\u5b9e\u7528\u6237\u7684\u6d4f\u89c8\u884c\u4e3a\uff0c\u5982\u6eda\u52a8\u9875\u9762\u3001\u70b9\u51fb\u6309\u94ae\u7b49\u3002<\/li>\n<li><strong>\u4f7f\u7528\u4ee3\u7406IP<\/strong>\uff1a\u901a\u8fc7\u4f7f\u7528\u4ee3\u7406IP\u6765\u907f\u514dIP\u88ab\u5c01\u7981\u3002<\/li>\n<li><strong>\u8bbe\u7f6eUser-Agent<\/strong>\uff1a\u5728\u8bf7\u6c42\u5934\u4e2d\u8bbe\u7f6eUser-Agent\uff0c\u6a21\u62df\u4e0d\u540c\u6d4f\u89c8\u5668\u7684\u8bf7\u6c42\u3002<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">from selenium.webdriver.common.action_ch<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns import ActionChains<\/p>\n<h2><strong>\u6a21\u62df\u6eda\u52a8\u9875\u9762<\/strong><\/h2>\n<p>def scroll_page():<\/p>\n<p>    for _ in range(10):<\/p>\n<p>        driver.execute_script(&quot;window.scrollBy(0, 1000);&quot;)<\/p>\n<p>        time.sleep(1)<\/p>\n<h2><strong>\u8bbe\u7f6eUser-Agent<\/strong><\/h2>\n<p>options = webdriver.ChromeOptions()<\/p>\n<p>options.add_argument(&#39;user-agent=Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4472.124 Safari\/537.36&#39;)<\/p>\n<h2><strong>\u521d\u59cb\u5316\u6d4f\u89c8\u5668<\/strong><\/h2>\n<p>driver = webdriver.Chrome(service=service, options=options)<\/p>\n<h2><strong>\u8bbf\u95ee\u5fae\u4fe1\u516c\u4f17\u53f7\u6587\u7ae0\u5217\u8868\u9875\u9762<\/strong><\/h2>\n<p>mp_url = &#39;https:\/\/mp.weixin.qq.com&#39;<\/p>\n<p>driver.get(mp_url)<\/p>\n<h2><strong>\u8bbe\u7f6e\u7b49\u5f85\u65f6\u95f4\uff0c\u786e\u4fdd\u9875\u9762\u52a0\u8f7d\u5b8c\u6210<\/strong><\/h2>\n<p>time.sleep(3)<\/p>\n<h2><strong>\u6a21\u62df\u626b\u7801\u767b\u5f55<\/strong><\/h2>\n<p>print(&quot;\u8bf7\u626b\u63cf\u4e8c\u7ef4\u7801\u767b\u5f55\u5fae\u4fe1&quot;)<\/p>\n<p>time.sleep(20)<\/p>\n<h2><strong>\u8f93\u5165\u516c\u4f17\u53f7\u540d\u79f0\u5e76\u641c\u7d22<\/strong><\/h2>\n<p>search_box = driver.find_element(By.XPATH, &#39;\/\/*[@id=&quot;query&quot;]&#39;)<\/p>\n<p>search_box.send_keys(&#39;\u516c\u4f17\u53f7\u540d\u79f0&#39;)<\/p>\n<p>search_button = driver.find_element(By.XPATH, &#39;\/\/*[@id=&quot;search_but&quot;]&#39;)<\/p>\n<p>search_button.click()<\/p>\n<p>time.sleep(3)<\/p>\n<h2><strong>\u83b7\u53d6\u6587\u7ae0\u94fe\u63a5<\/strong><\/h2>\n<p>articles = driver.find_elements(By.XPATH, &#39;\/\/*[@class=&quot;weui_media_title&quot;]&#39;)<\/p>\n<h2><strong>\u904d\u5386\u6587\u7ae0\u5217\u8868<\/strong><\/h2>\n<p>for article in articles:<\/p>\n<p>    article_title = article.text<\/p>\n<p>    article_link = article.get_attribute(&#39;hrefs&#39;)<\/p>\n<p>    print(f&quot;\u6807\u9898\uff1a{article_title}&quot;)<\/p>\n<p>    print(f&quot;\u94fe\u63a5\uff1a{article_link}&quot;)<\/p>\n<p>    # \u8bbf\u95ee\u6587\u7ae0\u9875\u9762<\/p>\n<p>    driver.get(article_link)<\/p>\n<p>    time.sleep(2)<\/p>\n<p>    # \u6a21\u62df\u6eda\u52a8\u9875\u9762<\/p>\n<p>    scroll_page()<\/p>\n<p>    # \u6293\u53d6\u6587\u7ae0\u5185\u5bb9<\/p>\n<p>    article_content = driver.find_element(By.XPATH, &#39;\/\/*[@class=&quot;rich_media_content &quot;]&#39;).text<\/p>\n<p>    print(f&quot;\u5185\u5bb9\uff1a{article_content}&quot;)<\/p>\n<p>    # \u8fd4\u56de\u6587\u7ae0\u5217\u8868\u9875\u9762<\/p>\n<p>    driver.back()<\/p>\n<p>    time.sleep(2)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u5b58\u50a8\u6293\u53d6\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u5c06\u6293\u53d6\u5230\u7684\u6587\u7ae0\u6570\u636e\u5b58\u50a8\u5230\u6587\u4ef6\u6216\u6570\u636e\u5e93\u4e2d\uff0c\u4ee5\u4fbf\u540e\u7eed\u5206\u6790\u548c\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import csv<\/p>\n<h2><strong>\u6253\u5f00CSV\u6587\u4ef6\uff0c\u51c6\u5907\u5199\u5165\u6570\u636e<\/strong><\/h2>\n<p>with open(&#39;wechat_articles.csv&#39;, mode=&#39;w&#39;, newline=&#39;&#39;, encoding=&#39;utf-8&#39;) as file:<\/p>\n<p>    writer = csv.writer(file)<\/p>\n<p>    writer.writerow([&#39;\u6807\u9898&#39;, &#39;\u94fe\u63a5&#39;, &#39;\u5185\u5bb9&#39;])<\/p>\n<p>    # \u904d\u5386\u6587\u7ae0\u5217\u8868\uff0c\u6293\u53d6\u6570\u636e\u5e76\u5199\u5165\u6587\u4ef6<\/p>\n<p>    for article in articles:<\/p>\n<p>        article_title = article.text<\/p>\n<p>        article_link = article.get_attribute(&#39;hrefs&#39;)<\/p>\n<p>        driver.get(article_link)<\/p>\n<p>        time.sleep(2)<\/p>\n<p>        scroll_page()<\/p>\n<p>        article_content = driver.find_element(By.XPATH, &#39;\/\/*[@class=&quot;rich_media_content &quot;]&#39;).text<\/p>\n<p>        writer.writerow([article_title, article_link, article_content])<\/p>\n<p>        driver.back()<\/p>\n<p>        time.sleep(2)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Python\u548cselenium\u5e93\u6765\u722c\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u6570\u636e\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u722c\u53d6\u6570\u636e\u65f6\u5e94\u9075\u5b88\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u548c\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\uff0c\u907f\u514d\u6ee5\u7528\u722c\u866b\u6280\u672f\u5bf9\u7f51\u7ad9\u9020\u6210\u8d1f\u62c5\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u83b7\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u7684\u6570\u636e\uff1f<\/strong><br \/>\u83b7\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u7684\u6570\u636e\u901a\u5e38\u9700\u8981\u4f7f\u7528\u4e00\u4e9b\u7f51\u7edc\u722c\u866b\u6280\u672f\u548c\u5de5\u5177\u3002\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528Python\u7684requests\u5e93\u548cBeautifulSoup\u5e93\u8fdb\u884c\u7f51\u9875\u8bf7\u6c42\u548c\u89e3\u6790\u3002\u9996\u5148\uff0c\u4f60\u9700\u8981\u627e\u5230\u76ee\u6807\u516c\u4f17\u53f7\u7684\u6587\u7ae0\u94fe\u63a5\uff0c\u7136\u540e\u4f7f\u7528requests\u5e93\u53d1\u9001\u8bf7\u6c42\u83b7\u53d6\u7f51\u9875\u5185\u5bb9\uff0c\u63a5\u7740\u4f7f\u7528BeautifulSoup\u89e3\u6790HTML\u7ed3\u6784\uff0c\u63d0\u53d6\u4f60\u6240\u9700\u7684\u4fe1\u606f\uff0c\u5982\u6807\u9898\u3001\u5185\u5bb9\u3001\u53d1\u5e03\u65f6\u95f4\u7b49\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u722c\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u6570\u636e\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u6cd5\u5f8b\u95ee\u9898\uff1f<\/strong><br \/>\u5728\u722c\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u6570\u636e\u65f6\uff0c\u9075\u5b88\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u6839\u636e\u4e2d\u56fd\u7684\u7f51\u7edc\u5b89\u5168\u6cd5\u548c\u76f8\u5173\u653f\u7b56\uff0c\u672a\u7ecf\u6388\u6743\u722c\u53d6\u4ed6\u4eba\u7f51\u7ad9\u7684\u6570\u636e\u53ef\u80fd\u4f1a\u6d89\u53ca\u4fb5\u6743\u3002\u56e0\u6b64\uff0c\u5efa\u8bae\u5728\u8fdb\u884c\u6570\u636e\u6293\u53d6\u524d\uff0c\u67e5\u770b\u516c\u4f17\u53f7\u7684\u4f7f\u7528\u6761\u6b3e\uff0c\u5e76\u786e\u4fdd\u4e0d\u8fdd\u53cd\u76f8\u5173\u6cd5\u5f8b\u3002\u540c\u65f6\uff0c\u5408\u7406\u63a7\u5236\u6293\u53d6\u9891\u7387\uff0c\u907f\u514d\u5bf9\u76ee\u6807\u7f51\u7ad9\u9020\u6210\u8d1f\u62c5\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u5fae\u4fe1\u516c\u4f17\u53f7\u6570\u636e\u4e2d\u7684\u53cd\u722c\u866b\u673a\u5236\uff1f<\/strong><br \/>\u8bb8\u591a\u5fae\u4fe1\u516c\u4f17\u53f7\u4f1a\u91c7\u53d6\u53cd\u722c\u866b\u63aa\u65bd\u6765\u4fdd\u62a4\u5176\u5185\u5bb9\u3002\u5e38\u89c1\u7684\u53cd\u722c\u866b\u6280\u672f\u5305\u62ecIP\u9650\u5236\u3001\u9a8c\u8bc1\u7801\u3001\u52a8\u6001\u52a0\u8f7d\u7b49\u3002\u5982\u679c\u9047\u5230\u8fd9\u4e9b\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u4ee3\u7406IP\u6c60\u6765\u89c4\u907fIP\u9650\u5236\uff0c\u6216\u8005\u4f7f\u7528selenium\u7b49\u5de5\u5177\u6a21\u62df\u7528\u6237\u64cd\u4f5c\uff0c\u4ee5\u5e94\u5bf9\u52a8\u6001\u52a0\u8f7d\u548c\u9a8c\u8bc1\u7801\u95ee\u9898\u3002\u7136\u800c\uff0c\u5efa\u8bae\u5728\u5904\u7406\u8fd9\u4e9b\u6280\u672f\u65f6\uff0c\u4fdd\u6301\u9053\u5fb7\u548c\u6cd5\u5f8b\u7684\u5e95\u7ebf\uff0c\u907f\u514d\u8fc7\u5ea6\u722c\u53d6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u722c\u53d6\u5fae\u4fe1\u516c\u4f17\u53f7\u6570\u636e\u7684\u65b9\u6cd5\u6709\u4f7f\u7528\u5fae\u4fe1\u5b98\u65b9\u63a5\u53e3\u3001\u5229\u7528\u7b2c\u4e09\u65b9\u5de5\u5177\u3001\u6a21\u62df\u6d4f\u89c8\u5668\u64cd\u4f5c\u3001\u4f7f\u7528\u722c\u866b\u6846\u67b6\u7b49\u3002\u6a21\u62df\u6d4f [&hellip;]","protected":false},"author":3,"featured_media":1115968,"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\/1115960"}],"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=1115960"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1115960\/revisions"}],"predecessor-version":[{"id":1115970,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1115960\/revisions\/1115970"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1115968"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1115960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1115960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1115960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}