{"id":115,"date":"2024-10-19T16:51:22","date_gmt":"2024-10-19T08:51:22","guid":{"rendered":"https:\/\/blog.muyou.wiki\/?p=115"},"modified":"2024-10-19T17:00:41","modified_gmt":"2024-10-19T09:00:41","slug":"%e6%8a%96%e9%9f%b3%e6%9d%a5%e5%ae%a2%e8%87%aa%e5%8a%a8%e5%8c%96","status":"publish","type":"post","link":"https:\/\/blog.muyou.wiki\/index.php\/2024\/10\/19\/%e6%8a%96%e9%9f%b3%e6%9d%a5%e5%ae%a2%e8%87%aa%e5%8a%a8%e5%8c%96\/","title":{"rendered":"\u6296\u97f3\u6765\u5ba2\u81ea\u52a8\u5316"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u7b80\u4ecb<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u7a0b\u5e8f\u4e3aPython\u5236\u4f5c \u4f7f\u7528selenium\u6a21\u62df\u7528\u6237\u70b9\u51fb\u7f51\u9875<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/blog.muyou.wiki\/wp-content\/uploads\/2024\/10\/\u5fae\u4fe1\u622a\u56fe_20241014151558-e1728891271719-1024x769.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"769\" data-original=\"https:\/\/blog.muyou.wiki\/wp-content\/uploads\/2024\/10\/\u5fae\u4fe1\u622a\u56fe_20241014151558-e1728891271719-1024x769.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-79\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\uff08\u4ec5\u4e3a\u7b80\u5355\u6b3e\uff0c\u4e2a\u4eba\u4f7f\u7528\uff0c\u6ca1\u4ec0\u4e48\u6280\u672f\uff0c\u4e0d\u9002\u7528\u5176\u4ed6\u516c\u53f8\uff0c\u4ec5\u4e3a\u53c2\u8003\u4f7f\u7528\uff09<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6574\u5957\u7a0b\u5e8f\u5206\u4e3a\u4e24\u4e2a\u7a0b\u5e8f \u4e00\u4e2a\u4e3a\u7ed9\u6bcf\u4e2a\u95e8\u5e97\u5355\u72ec\u8fd0\u884c\u751f\u6210\u89c6\u9891 \u8fd0\u884c\u4e00\u6b21\u5230\u7ed3\u675f\u4f1a\u4e3a\u6bcf\u4e2a\u95e8\u5e97\u751f\u62107\u6761\u5de6\u53f3\u89c6\u9891 \u4e00\u4e2a\u4e3a\u95e8\u5e97\u81ea\u52a8\u53d1\u5e03\u89c6\u9891 \u8fd0\u884c\u4e00\u6b21\u5230\u7ed3\u675f\u4f1a\u4e3a\u6bcf\u4e2a\u95e8\u5e97\u6210\u529f\u53d1\u5e03\u4e00\u6761\u89c6\u9891<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8fd0\u884c\u73af\u5883\u4e0e\u51c6\u5907<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>python3.0\u4ee5\u4e0a<\/li>\n\n\n\n<li>\u901a\u8fc7pip\u5b89\u88c5\u597dselenium<\/li>\n\n\n\n<li>\u914d\u7f6e\u597dpython\u7684path\u73af\u5883<\/li>\n\n\n\n<li>\u95e8\u5e97\u540d\u79f0\u8868\u683c\u5217\u4e3atxt\u4f5c\u5bfc\u5165<\/li>\n\n\n\n<li>Edge\u81ea\u52a8\u5316\u9a71\u52a8<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u521b\u5efa\u89c6\u9891<\/h2>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>from selenium import webdriver\nfrom selenium.webdriver.edge.service import Service\nfrom selenium.webdriver.common.by import By\nfrom selenium.common.exceptions import NoSuchElementException\nfrom selenium.webdriver.edge.options import Options\nfrom selenium.webdriver.support.ui import WebDriverWait\nfrom selenium.webdriver.support import expected_conditions as EC\nimport time\nimport random\n\n\n# \u521b\u5efa Edge Options \u5bf9\u8c61\noptions = Options()\n\n# \u8bbe\u7f6e\u6d4f\u89c8\u5668\u542f\u52a8\u53c2\u6570\uff0c\u5173\u95ed\u4e0d\u5fc5\u8981\u7684\u65e5\u5fd7\noptions.add_argument('--disable-logging')  # \u7981\u7528\u6240\u6709\u65e5\u5fd7\noptions.add_argument('--log-level=3')      # \u4ec5\u663e\u793a\u9519\u8bef\u65e5\u5fd7\noptions.add_argument('--ignore-certificate-errors')  # \u5ffd\u7565SSL\u8bc1\u4e66\u9519\u8bef\noptions.add_argument('--ignore-ssl-errors=yes')      # \u5ffd\u7565SSL\u9519\u8bef\n\n#\u5b9a\u4e49\u6d4f\u89c8\u5668\u9a71\u52a8\nwd = webdriver.Edge(service=Service(r'\u586b\u4e0aEdge\u9a71\u52a8\u8def\u5f84', log_path='NUL'),options=options)\n#\u5168\u5c40\u7b49\u5f85\nwd.implicitly_wait(10)\n\n\n#\u6253\u5f00\u7f51\u9875\nwd.get('https:\/\/life.douyin.com\/p\/login')\n\n\n#\u767b\u5f55\u6a21\u5757################################################################################################################################\n\n#\u8d26\u53f7\u5bc6\u7801\u767b\u5f55\nelement = wd.find_element(By.CLASS_NAME, 'src-pages-Login-components-LoginCard-index-module__to-login--KMNbD--212e2')\nelement.click()\n\n#\u8f93\u5165\u8d26\u53f7\naccount_element = wd.find_element(By.CSS_SELECTOR, '.life-core-input-inner__wrapper.life-core-input-inner__wrapper-border.life-core-input-inner__wrapper-size-md &gt; .life-core-input.life-core-input-size-md')\naccount_element.send_keys(\"\u8d26\u53f7\")\n\n#\u5207\u6362\u5bc6\u7801\u767b\u5f55\nelement = wd.find_element(By.CLASS_NAME, 'src-pages-Login-components-Phone-index-module__login-tip--ccjZV--212e2.switch-tip')\nelement.click()\n\n#\u8f93\u5165\u5bc6\u7801\npassword_element = wd.find_element(By.CSS_SELECTOR, '.life-core-input-inner__wrapper.life-core-input-inner__wrapper-border.life-core-input-inner__wrapper-size-md.life-core-input-inner__wrapper-add-suffix &gt; .life-core-input.life-core-input-size-md')\npassword_element.send_keys(\"\u5bc6\u7801\")\n\n#\u540c\u610f\u7528\u6237\u534f\u8bae\nelement = wd.find_element(By.CSS_SELECTOR, '.life-core-checkbox-icon')\nelement.click()\n\n#\u70b9\u51fb\u767b\u5f55\nelement = wd.find_element(By.CSS_SELECTOR, '.life-core-btn.life-core-btn-size-md.life-core-btn-type-primary.life-core-btn-shape-angle.life-core-can-input-grouped.src-pages-Login-components-Phone-index-module__form-item--MUJ4u--212e2')\nelement.click()\n\ntime.sleep(10)\n\n#\u6253\u5f00\u667a\u80fd\u521b\u4f5c\nwd.get('https:\/\/life.douyin.com\/p\/life_creation\/aigc?groupid=1800366705567748')\n\n#\u5173\u95ed\u5f39\u7a97\nelement = wd.find_element(By.CSS_SELECTOR, '.venus-poptip.venus-poptip_show &gt; .venus-poptip-footer &gt; .venus-button-box &gt; .venus-button.venus-button-xs.venus-button-default')\nelement.click()\n\n# \u8bfb\u53d6\u6587\u672c\u6587\u4ef6\nwith open(r'C:\\Users\\abc31\\Desktop\\\u6296\u97f3\u6765\u5ba2\u81ea\u52a8\u5316\u9879\u76ee\\list.txt', 'r', encoding='utf-8') as file:  \n    lines = file.readlines()\n\n# \u5faa\u73af\u904d\u5386\u6bcf\u4e00\u884c\nfor index, line in enumerate(lines):\n    \n    #\u70b9\u51fb\u667a\u80fd\u521b\u4f5c\n    input_element = wd.find_element(By.XPATH, '\/\/*&#91;@id=\"root\"]\/div\/div&#91;3]\/div&#91;1]\/div&#91;2]\/button')\n    input_element.click()\n\n    #\u6253\u5f00\u95e8\u5e97\u5217\u8868\n    input_element = wd.find_element(By.XPATH, 'id(\"root\")\/DIV&#91;1]\/DIV&#91;2]\/DIV&#91;1]\/FORM&#91;1]\/DIV&#91;3]\/DIV&#91;1]\/SPAN&#91;2]\/SPAN&#91;1]\/DIV&#91;1]')\n    input_element.click()\n\n    #\u641c\u7d22\u95e8\u5e97\n    input_element = wd.find_element(By.CSS_SELECTOR, '.byted-input-inner__wrapper.byted-input-inner__wrapper-size-md.byted-input-inner__wrapper-add-prefix.byted-input-inner__wrapper-add-suffix')\n    input_element.send_keys(line.strip()) \n    time.sleep(2)\n\n    #\u9009\u62e9\u95e8\u5e97\n    input_element = wd.find_element(By.CSS_SELECTOR, 'div.index-module_account-select-item-pc__gGLFy')\n    input_element.click()\n    time.sleep(2)\n\n    #\u6253\u5f00\u5957\u9910\u5217\u8868\n    input_element = wd.find_element(By.XPATH, '\/\/*&#91;@id=\"root\"]\/div\/div&#91;2]\/div\/form\/div&#91;6]\/button')\n    input_element.click()\n\n    #\u641c\u7d22\u56e2\u5355\n    element = wd.find_element(By.CSS_SELECTOR, '.byted-input-inner__wrapper.byted-input-inner__wrapper-border.byted-input-inner__wrapper-size-md.byted-input-inner__wrapper-add-suffix')\n    element.send_keys('\u3010\u65b0\u5ba2\u7279\u60e0-\u534a\u8d34\u7f8e\u7532\u3011\u8f7b\u5962\u7b80\u7ea6\u6b3e\u5f0f\u4e0d\u9650')\n    time.sleep(1)\n\n    try:\n        #\u68c0\u67e5\u5f53\u524d\u95e8\u5e97\u6709\u65e049\u56e2\u5355\n        empty_element = wd.find_element(By.XPATH, '\/\/*&#91;contains(text(), \"\u6682\u65e0\u53ef\u5173\u8054\u7684\u5546\u54c1\")]')\n        element = wd.find_element(By.CSS_SELECTOR, '.byted-input-inner__wrapper-focus &gt; .byted-input')\n        element.clear()\n        element.send_keys('\u3010\u8d85\u503c\u5957\u9910\u3011\u534a\u8d34\/\u5168\u8d34+\u542bv\u5efa\u6784')\n        element = wd.find_element(By.XPATH, '\/\/*&#91;contains(text(), \"\u3010\u8d85\u503c\u5957\u9910\u3011\u534a\u8d34\/\u5168\u8d34+\u542bv\u5efa\u6784+\")]')\n        element.click()\n        print(\"\u5f53\u524d\u95e8\u5e97\u672a\u627e\u523049\u56e2\u5355 \u6b63\u5728\u6539\u4e3a77\u56e2\u5355\")\n\n    except NoSuchElementException:\n        print(\"\u5df2\u9009\u62e949\u56e2\u5355\")\n        element = wd.find_element(By.XPATH, '\/\/*&#91;contains(text(), \"\u3010\u65b0\u5ba2\u7279\u60e0-\u534a\u8d34\u7f8e\u7532\u3011\u8f7b\u5962\u7b80\u7ea6\u6b3e\u5f0f\u4e0d\u9650+\")]')\n        element.click()\n\n    \n    #\u786e\u8ba4\n    input_element = wd.find_element(By.CSS_SELECTOR, '.byted-content-inner-wrapper .byted-btn-type-primary')\n    input_element.click()\n\n    #\u6253\u5f00\u7d20\u6750\u5e93\n    input_element = wd.find_element(By.CSS_SELECTOR, 'div:nth-child(10) .upload-border')\n    wd.execute_script(\"arguments&#91;0].scrollIntoView(true);\", input_element)\n    input_element.click()\n\n    #\u52a0\u8f7d\u5143\u7d20\n    WebDriverWait(wd, 10).until(EC.presence_of_all_elements_located((By.CSS_SELECTOR, '.material-select-item .byted-checkbox-icon')))\n    time.sleep(2)\n\n    #\u6eda\u52a8\u52a0\u8f7d\n    for i in range(8):\n        try:\n            last_elements = wd.find_elements(By.CSS_SELECTOR, '.material-select-item .byted-checkbox-icon')\n            if last_elements:\n                last_element = last_elements&#91;-1]\n                wd.execute_script(\"arguments&#91;0].scrollIntoView(true);\", last_element)\n                time.sleep(1)  # \u7b49\u5f85\u9875\u9762\u52a0\u8f7d\u65b0\u5185\u5bb9\n            else:\n                print(f\"\u672a\u627e\u5230\u4efb\u4f55\u5143\u7d20\uff0c\u7b49\u5f85\u66f4\u591a\u5185\u5bb9\u52a0\u8f7d\")\n                time.sleep(2)\n        except Exception as e:\n            print(f\"\u7b2c {i+1} \u6b21\u6eda\u52a8\u65f6\u53d1\u751f\u9519\u8bef: {e}\")\n    # \u627e\u5230\u6240\u6709\u76ee\u6807\u5143\u7d20\uff08\u5047\u8bbe\u4f7f\u7528\u67d0\u4e2a\u901a\u7528\u9009\u62e9\u5668\uff09\n    elements = wd.find_elements(By.CSS_SELECTOR, '.material-select-item .byted-checkbox-icon')\n    \n    # \u968f\u673a\u9009\u62e9 4-6 \u4e2a\u5143\u7d20\n    num_to_click = random.randint(4, 6)\n    selected_elements = random.sample(elements, num_to_click)\n\n    #\u70b9\u51fb\n    for element in selected_elements:\n        wd.execute_script(\"arguments&#91;0].scrollIntoView(true);\", element)\n        time.sleep(1)\n        element.click()\n    \n    #\u6dfb\u52a0\u7d20\u6750\n    input_element = wd.find_element(By.CSS_SELECTOR, 'button.mr-16')\n    input_element.click()\n\n    #\u63d0\u4ea4\n    input_element = wd.find_element(By.CSS_SELECTOR, 'button.byted-btn-type-primary')\n    input_element.click()\n\n    # \u6bcf\u6b21\u5faa\u73af\u7ed3\u675f\u540e\u7684\u63d0\u793a\n    print(f\"\u7b2c {index + 1} \u6b21\u5faa\u73af {line.strip()}\u89c6\u9891\u751f\u6210\u4e2d\")  \n\n    time.sleep(1)  # \u7b49\u5f851\u79d2\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8c03\u6574\n\n# \u8f93\u51fa\u6700\u7ec8\u63d0\u793a\nprint(\"\u6240\u6709\u95e8\u5e97\u89c6\u9891\u5df2\u7ecf\u5728\u751f\u4ea7\u4e2d\u3002\")\n\ninput('\u56de\u8f66\u5173\u95ed\u7a0b\u5e8f')<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u53d1\u5e03\u89c6\u9891<\/h2>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code>from selenium import webdriver\nfrom selenium.webdriver.chrome.service import Service\nfrom selenium.webdriver.common.by import By\nimport time\nfrom selenium.webdriver.common.keys import Keys\n\n#\u5b9a\u4e49\u6d4f\u89c8\u5668\u9a71\u52a8\nwd = webdriver.Edge(service=Service(r'C:\\Users\\abc31\\Desktop\\selenium\\msedgedriver.exe'))\n#\u5168\u5c40\u7b49\u5f85\nwd.implicitly_wait(5)\n\n#\u6253\u5f00\u7f51\u9875\nwd.get('https:\/\/life.douyin.com\/p\/login')\n\n\n#\u767b\u5f55\u6a21\u5757################################################################################################################################\n\n#\u8d26\u53f7\u5bc6\u7801\u767b\u5f55\nelement = wd.find_element(By.CLASS_NAME, 'src-pages-Login-components-LoginCard-index-module__to-login--KMNbD--212e2')\nelement.click()\n\n#\u8f93\u5165\u8d26\u53f7\naccount_element = wd.find_element(By.CSS_SELECTOR, '.life-core-input-inner__wrapper.life-core-input-inner__wrapper-border.life-core-input-inner__wrapper-size-md &gt; .life-core-input.life-core-input-size-md')\naccount_element.send_keys(\"\u8d26\u53f7\")\n\n#\u5207\u6362\u5bc6\u7801\u767b\u5f55\nelement = wd.find_element(By.CLASS_NAME, 'src-pages-Login-components-Phone-index-module__login-tip--ccjZV--212e2.switch-tip')\nelement.click()\n\n#\u8f93\u5165\u5bc6\u7801\npassword_element = wd.find_element(By.CSS_SELECTOR, '.life-core-input-inner__wrapper.life-core-input-inner__wrapper-border.life-core-input-inner__wrapper-size-md.life-core-input-inner__wrapper-add-suffix &gt; .life-core-input.life-core-input-size-md')\npassword_element.send_keys(\"\u5bc6\u7801\")\n\n#\u540c\u610f\u7528\u6237\u534f\u8bae\nelement = wd.find_element(By.CSS_SELECTOR, '.life-core-checkbox-icon')\nelement.click()\n\n#\u70b9\u51fb\u767b\u5f55\nelement = wd.find_element(By.CSS_SELECTOR, '.life-core-btn.life-core-btn-size-md.life-core-btn-type-primary.life-core-btn-shape-angle.life-core-can-input-grouped.src-pages-Login-components-Phone-index-module__form-item--MUJ4u--212e2')\nelement.click()\n\ntime.sleep(10)\n\n#\u6253\u5f00\u667a\u80fd\u521b\u4f5c\nwd.get('https:\/\/life.douyin.com\/p\/life_creation\/aigc?groupid=1800366705567748')\n\n#\u5173\u95ed\u5f39\u7a97\nelement = wd.find_element(By.CSS_SELECTOR, '.venus-poptip.venus-poptip_show &gt; .venus-poptip-footer &gt; .venus-button-box &gt; .venus-button.venus-button-xs.venus-button-default')\nelement.click()\n\n#\u6253\u5f00\u53d1\u5e03\u5217\u8868\nelement = wd.find_element(By.CSS_SELECTOR, 'div.status-bar:nth-child(1)')\nelement.click()\n\nwith open('list.txt', 'r', encoding='utf-8') as file:  \n    lines = file.readlines()\n\n#\u5931\u8d25\u53d8\u91cf\nshibai = 0\n\n#\u6210\u529f\u53d8\u91cf\nchenggong = 0\n\n#\u5168\u90e8\u89c6\u9891\u53d8\u91cf\nquanbu = 0\n\n# \u5faa\u73af\u904d\u5386\u6bcf\u4e00\u884c\nfor index, line in enumerate(lines):\n\n    #\u6253\u5f00\u95e8\u5e97\u5217\u8868\n    index_element = wd.find_element(By.CSS_SELECTOR, '.w-full .index-module_detail-indicator__ggGQp')\n    index_element.click()\n\n    #\u641c\u7d22\u95e8\u5e97\n    index_element = wd.find_element(By.CSS_SELECTOR, 'div:nth-child(32) .byted-input-inner__wrapper:nth-child(1)')\n    \n    #\u68c0\u67e5\u5faa\u73af \u6e05\u7a7a\u8f93\u5165\u6846\n    if index &gt; 0:\n        index_element = wd.find_element(By.CSS_SELECTOR, 'div:nth-child(32) .byted-input-inner__wrapper:nth-child(1)')\n        index_element.send_keys(Keys.CONTROL + \"a\")\n        index_element.send_keys(Keys.BACKSPACE)\n    index_element.send_keys(line.strip()) \n    time.sleep(1)\n\n    #\u9009\u62e9\u95e8\u5e97\n    index_element = wd.find_element(By.CSS_SELECTOR, 'div:nth-child(32) .index-module_account-select-item-pc__gGLFy:nth-child(1)')\n    index_element.click()\n\n    #\u5faa\u73af\u53d1\u5e03\n    for i in range(1, 50):\n\n    # \u4f7f\u7528 f-string \u52a8\u6001\u751f\u6210 CSS \u9009\u62e9\u5668\n        selector = f\".flex:nth-child({i}) .byted-checkbox-icon\"\n\n        #\u5feb\u6377\u53d1\u5e03\n        element = wd.find_element(By.XPATH, '\/html\/body\/div&#91;17]\/div\/div&#91;2]\/div\/div&#91;4]\/div\/div\/div\/button&#91;1]')\n        element.click()\n\n        #\u52fe\u9009\n        element = wd.find_element(By.CSS_SELECTOR, selector)\n        wd.execute_script(\"arguments&#91;0].scrollIntoView(true);\", element)\n        element.click()\n\n        #\u53d1\u5e03\n        element = wd.find_element(By.XPATH, '\/html\/body\/div&#91;17]\/div\/div&#91;2]\/div\/div&#91;4]\/div\/div\/div&#91;1]\/button&#91;1]')\n        element.click()\n\n        print(f\"{line.strip()}\u89c6\u9891\u53d1\u5e03\u4e2d\uff0c\u5f53\u524d\u7b2c {i} \u6761\u53d1\u5e03\u4e2d\")\n\n        quanbu += 1\n\n        time.sleep(5)\n\n        #\u68c0\u67e5\u662f\u5426\u5b58\u5728\u5305\u542b \"\u5df2\u4e0a\u7ebf\" \u6587\u672c\u7684\u5143\u7d20\n        if len(wd.find_elements(By.XPATH, '\/\/*&#91;contains(text(), \"\u5df2\u4e0a\u7ebf\")]')) == 0:\n            print(\"\u89c6\u9891\u53d1\u5e03\u5931\u8d25\uff0c\u6b63\u5728\u53d1\u5e03\u4e0b\u4e00\u6761\")\n            shibai += 1\n\n            # \u5982\u679c\u6ca1\u6709\u68c0\u6d4b\u5230\u8be5\u5143\u7d20\uff0c\u7ee7\u7eed\u4e0b\u4e00\u6b21\u5faa\u73af\n            continue\n            \n        #\u5982\u679c\u68c0\u6d4b\u5230\u5305\u542b \"\u5df2\u4e0a\u7ebf\" \u6587\u672c\u7684\u5143\u7d20\uff0c\u6267\u884c\u65b0\u7684\u64cd\u4f5c\n        print(\"\u89c6\u9891\u53d1\u5e03\u6210\u529f\uff0c\u5373\u5c06\u5f00\u59cb\u4e0b\u4e00\u5bb6\u53d1\u5e03\")\n        chenggong += 1\n        break  \n    continue\nprint(f\"\u603b\u5171\u53d1\u5e03\u4e86 {quanbu} \u4e2a\u89c6\u9891 \u5176\u4e2d\u53d1\u5e03\u6210\u529f{chenggong}\u4e2a \u53d1\u5e03\u5931\u8d25{shibai}\u4e2a\")\ninput('\u56de\u8f66\u5173\u95ed\u7a0b\u5e8f')<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb \u6b64\u7a0b\u5e8f\u4e3aPython\u5236\u4f5c \u4f7f\u7528selenium\u6a21\u62df\u7528\u6237\u70b9\u51fb\u7f51\u9875 \uff08\u4ec5\u4e3a\u7b80\u5355\u6b3e\uff0c\u4e2a\u4eba\u4f7f\u7528\uff0c\u6ca1\u4ec0\u4e48\u6280\u672f\uff0c\u4e0d\u9002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-115","post","type-post","status-publish","format-standard","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/posts\/115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/comments?post=115"}],"version-history":[{"count":4,"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":122,"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/posts\/115\/revisions\/122"}],"wp:attachment":[{"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/media?parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/categories?post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.muyou.wiki\/index.php\/wp-json\/wp\/v2\/tags?post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}