{"id":471,"date":"2023-09-06T11:33:21","date_gmt":"2023-09-06T03:33:21","guid":{"rendered":"https:\/\/btc354.com\/?p=471"},"modified":"2023-09-06T12:07:17","modified_gmt":"2023-09-06T04:07:17","slug":"python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99","status":"publish","type":"post","link":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/","title":{"rendered":"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">Selenium\u662f\u4e00\u4e2a\u7528\u4e8eWeb\u5e94\u7528\u7a0b\u5e8f\u6d4b\u8bd5\u7684\u5de5\u5177\u3002Selenium\u6d4b\u8bd5\u76f4\u63a5\u8fd0\u884c\u5728\u6d4f\u89c8\u5668\u4e2d\uff0c\u5c31\u50cf\u771f\u6b63\u7684\u7528\u6237\u5728\u64cd\u4f5c\u4e00\u6837\u3002\u652f\u6301\u7684\u6d4f\u89c8\u5668\u5305\u62ecIE\uff087, 8, 9, 10, 11\uff09\uff0cMozilla Firefox\uff0cSafari\uff0cGoogle Chrome\uff0cOpera\uff0cEdge\u7b49\u3002\u8fd9\u4e2a\u5de5\u5177\u7684\u4e3b\u8981\u529f\u80fd\u5305\u62ec\uff1a\u6d4b\u8bd5\u4e0e\u6d4f\u89c8\u5668\u7684\u517c\u5bb9\u6027\u2014\u2014\u6d4b\u8bd5\u5e94\u7528\u7a0b\u5e8f\u770b\u662f\u5426\u80fd\u591f\u5f88\u597d\u5f97\u5de5\u4f5c\u5728\u4e0d\u540c\u6d4f\u89c8\u5668\u548c\u64cd\u4f5c\u7cfb\u7edf\u4e4b\u4e0a\u3002\u6d4b\u8bd5\u7cfb\u7edf\u529f\u80fd\u2014\u2014\u521b\u5efa\u56de\u5f52\u6d4b\u8bd5\u68c0\u9a8c\u8f6f\u4ef6\u529f\u80fd\u548c\u7528\u6237\u9700\u6c42\u3002\u652f\u6301\u81ea\u52a8\u5f55\u5236\u52a8\u4f5c\u548c\u81ea\u52a8\u751f\u6210.Net\u3001Java\u3001Perl\u7b49\u4e0d\u540c\u8bed\u8a00\u7684\u6d4b\u8bd5\u811a\u672c\u3002<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u5b89\u88c5chrome+chromeDriver<\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-\u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9 wp-block-embed-\u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"FW0nK6dc1r\"><a href=\"https:\/\/btc354.com\/index.php\/2023\/08\/30\/centos%e5%ae%89%e8%a3%85chrome-chromedriver\/\">Centos\u5b89\u88c5chrome + chromeDriver<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u300a Centos\u5b89\u88c5chrome + chromeDriver \u300b\u2014\u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9\" src=\"https:\/\/btc354.com\/index.php\/2023\/08\/30\/centos%e5%ae%89%e8%a3%85chrome-chromedriver\/embed\/#?secret=GpBtcKORVo#?secret=FW0nK6dc1r\" data-secret=\"FW0nK6dc1r\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u5b89\u88c5\u8bed\u8a00\u5305<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# step1:\u9700\u8981\u5b89\u88c5\u5b57\u4f53\u5e93\nyum -y install fontconfig\n\n# step2:\u521b\u5efa\u6587\u4ef6\u5939\nmkdir\/usr\/share\/fonts\/myfonts\n\n# step3:\u5c06C\u76d8\u4e0b\u7684Windows\/Fonts\u76ee\u5f55\u4e0b\uff0c\u540e\u7f00\u540d\u4e3attc\u548cttf\u7684\u6587\u4ef6\u7c98\u8d34\u590d\u5236\u5230\u5728Linux\u4e2d\u65b0\u5efa\u7acb\u7684\u6587\u4ef6\u5939\u4e2d\n\n# step4:\u8d4b\u6743\uff0c\nchmod -R 755 \/usr\/share\/fonts\/myfonts\/\n\n# step5:\u6267\u884cttmkfdir\u547d\u4ee4\uff0c\u4e3a\u4e86\u641c\u7d22\u76ee\u5f55\u4e2d\u6240\u6709\u7684\u5b57\u4f53\u4fe1\u606f\nyum -y install ttmkfdir\n\n# step6:\u67e5\u770b\u5b57\u4f53\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u5b57\u4f53\u8def\u5f84\nvi\/etc\/fonts\/fonts.conf\n\n# step7:\u5c06\u65b0\u5b57\u4f53\u7684\u7f13\u5b58\u8fdb\u884c\u5237\u65b0\uff0c\u76ee\u7684\u662f\u4e3a\u4e86\u5c06\u521a\u521a\u7684\u914d\u7f6e\u751f\u6548\nfc -cache\n\n# step8:\u67e5\u770b\u4e2d\u6587\u5b57\u4f53\u662f\u5426\u6210\u529f\u6dfb\u52a0\u8fdb\u53bb\nfc -list\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u4f7f\u7528python\u4ee3\u7801\u5b9e\u73b0\u7f51\u7ad9\u7684\u767b\u5f55<\/h2>\n\n\n\n<p>\u25a0\u914d\u7f6e\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#!\/usr\/bin\/python3\n# -*- coding: utf-8 -*-\nimport time\nfrom selenium import webdriver\nfrom selenium.common.exceptions import NoSuchElementException\nfrom selenium.webdriver.common.by import By\nfrom selenium.webdriver.support import expected_conditions as EC\nfrom helium import *\nfrom bs4 import BeautifulSoup\nimport logging\nimport os\nimport smtplib\nfrom email.mime.text import MIMEText\nfrom email.mime.multipart import MIMEMultipart\nimport pymysql\nimport traceback\nfrom datetime import datetime\nimport pickle\n\nclass demoSpider():\n    \n    def __init__(self):\n        self.batch_id = 4\n        self.login_batch_kbn = 1\n        self.login_id = 1\n\n        self.root_dir = &quot;\/www\/python\/demo\/&quot;\n        self.cookie_file = self.root_dir + &quot;cookies.pkl&quot;\n        self.logs_dir = self.root_dir + &quot;logs\/&quot;\n        self.screenshot_dir = self.root_dir + &quot;images\/screen\/&quot;\n        self.cache_dir = self.root_dir + &quot;cache\/&quot;\n        # Chrome\u8bbe\u5b9a\n\t\t# \u6a21\u62df\u624b\u673a\n        self.user_agent = &#039;Mozilla\/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit\/605.1.15 (KHTML, like Gecko) Version\/13.0.3 Mobile\/15E148 Safari\/604.1&#039;\n        self.options = webdriver.ChromeOptions()\n        #\u8bbe\u7f6echrome\u6d4f\u89c8\u5668\u65e0\u754c\u9762\u6a21\u5f0f\n        self.options.add_argument(&#039;--headless&#039;)\n        self.driver_path = &#039;\/usr\/local\/bin\/chromedriver&#039;\n        self.options.add_argument(&#039;user-agent={0}&#039;.format(self.user_agent))\n        # \u4f7f\u7528mobile\u5c3a\u5bf8\u7a97\u53e3\u6253\u5f00\u6d4f\u89c8\u5668\n        self.options.add_argument(&quot;window-size=375,1000&quot;)\n        # \u4ee5\u6700\u9ad8\u6743\u9650\u8fd0\u884c\n        self.options.add_argument(&#039;--no-sandbox&#039;)\n        # \u7981\u7528\u6d4f\u89c8\u5668\u63d0\u793a\u6b63\u5728\u53d7\u81ea\u52a8\u5316\u8f6f\u4ef6\u63a7\u5236\n        self.options.add_experimental_option(&#039;useAutomationExtension&#039;, False)\n        # \u9632\u6b62\u53cd\u722c\n        self.options.add_experimental_option(&#039;excludeSwitches&#039;, &#x5B;&#039;enable-automation&#039;])\n        # \u6307\u5b9a\u7528\u6237\u6587\u4ef6\u5939User Data\u8def\u5f84\uff0c\u53ef\u4ee5\u628a\u4e66\u7b7e\u8fd9\u6837\u7684\u7528\u6237\u6570\u636e\u4fdd\u5b58\u5728\u7cfb\u7edf\u5206\u533a\u4ee5\u5916\u7684\u5206\u533a\n        self.options.add_argument(&#039;--user-data-dir=&#039; + self.cache_dir + str(self.login_id))\n        # \u6307\u5b9a\u7f13\u5b58Cache\u8def\u5f84\n        self.options.add_argument(&#039;--disk-cache-dir=&#039; + self.cache_dir + str(self.login_id))\n        # \u8c37\u6b4c\u6587\u6863\u63d0\u5230\u9700\u8981\u52a0\u4e0a\u8fd9\u4e2a\u5c5e\u6027\u6765\u89c4\u907fbug\n        self.options.add_argument(&#039;--disable-gpu&#039;)\n        # \u5b57\u4f53\n        self.options.add_argument(&#039;--lang=ja&#039;)\n\t\t# \u89e3\u51b3DevToolsActivePort file doesn&#039;t exist\u7684\u95ee\u9898\n        self.options.add_argument(&quot;--remote-debugging-port=9222&quot;) \n        # \u7981\u7528\u6d4f\u89c8\u5668\u5f39\u7a97\n        prefs = {\n            &#039;profile.default_content_setting_values&#039;: {\n                &#039;notifications&#039;: 2\n            }\n        }\n        self.options.add_experimental_option(&#039;prefs&#039;, prefs)\n\n        self.driver = webdriver.Chrome(options = self.options)\n   \n        # \u90ae\u4ef6\u4fe1\u606f\n        self.sender = &quot;xxx@qq.com&quot;\n        self.mail_password = &quot;123456&quot;\n        self.mail_to = &#x5B;\n            &quot;xxx2@qq.com&quot;\n        ]\n        self.smtp = &quot;smtp.xxx&quot;\n        self.smtp_port = &quot;465&quot;\n        # DB\u60c5\u5831\n        self.db_config = {\n          &#039;host&#039; : &quot;localhost&quot;,\n          &#039;port&#039; : 3306,\n          &#039;user&#039; : &quot;demo&quot;,\n          &#039;password&#039; : &quot;jAG4PmAe7k8WADjH&quot;,\n          &#039;database&#039; : &quot;demo&quot;,\n          &#039;charset&#039; : &#039;utf8&#039;,\n          &#039;cursorclass&#039;:pymysql.cursors.Cursor,\n        }\n        # log\n        logging.basicConfig(level = logging.INFO,#\u63a7\u5236\u53f0\u6253\u5370\u7684\u65e5\u5fd7\u7ea7\u522b\n            filename = self.logs_dir + &#039;py_debug_demo_&#039; + time.strftime(&quot;%Y%m%d&quot;, time.localtime())  + &#039;.log&#039;,\n            filemode = &#039;a&#039;,##\u6a21\u5f0f\uff0c\u6709w\u548ca\uff0cw\u5c31\u662f\u5199\u6a21\u5f0f\uff0c\u6bcf\u6b21\u90fd\u4f1a\u91cd\u65b0\u5199\u65e5\u5fd7\uff0c\u8986\u76d6\u4e4b\u524d\u7684\u65e5\u5fd7\n            #a\u662f\u8ffd\u52a0\u6a21\u5f0f\uff0c\u9ed8\u8ba4\u5982\u679c\u4e0d\u5199\u7684\u8bdd\uff0c\u5c31\u662f\u8ffd\u52a0\u6a21\u5f0f\n            format = &#039;&#x5B;%(asctime)s] %(message)s&#039;\n            #\u65e5\u5fd7\u683c\u5f0f\n        )\n        pass\n<\/pre><\/div>\n\n\n<p>\u25a0DB\u64cd\u4f5c\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef get_login_data(self):\n        try:\n            logging.info(&quot;get demo login data start.&quot;)\n            # \u6253\u5f00\u6570\u636e\u5e93\u8fde\u63a5\n            db = pymysql.connect(**self.db_config)\n            # \u4f7f\u7528cursor()\u65b9\u6cd5\u83b7\u53d6\u64cd\u4f5c\u6e38\u6807\n            cursor = db.cursor()\n\n            select_sql = &quot;SELECT login_user,login_password FROM &quot; + self.db_demo_login + &quot; WHERE id = &quot; + str(self.login_id) + &quot; AND `status` = 1&quot; \n\n            # \u4f7f\u7528 execute()  \u65b9\u6cd5\u6267\u884c SQL \u67e5\u8be2 \n            cursor.execute(select_sql)\n    \n            # \u4f7f\u7528 fetchone() \u65b9\u6cd5\u83b7\u53d6\u5355\u6761\u6570\u636e\n            data = cursor.fetchall()\n\n            # \u5173\u95ed\u6570\u636e\u5e93\u8fde\u63a5 \n            db.close()\n\n            logging.info(&quot;get demo login data end.&quot;)\n\n            return data&#x5B;0]\n        except:\n            error_message = &quot;get demo login data error.\\n&quot;\n            error_message += &quot;traceback.format_exc():\\n%s&quot; % traceback.format_exc() + &quot;\\n&quot;\n            logging.info(error_message)\n<\/pre><\/div>\n\n\n<p>\u25a0\u6293\u53d6\u7f51\u7ad9\u6570\u636e\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ndef get_demo_item(self):\n        try:\n        logging.info(&quot;demo get data start.&quot;)\n        logging.info(&quot;product id : &quot; + self.product_id)\n        # \u753b\u9762\u8bbf\u95ee\n        # self.load_and_set_cookie()\n        self.driver.get(self.products_url.format(self.product_id))        \n        time.sleep(self.sleep_second)\n\n        soup = BeautifulSoup(self.driver.page_source, &quot;html.parser&quot;)\n        all_items = &#x5B;]\n\n        # \u622a\u56fe\n        self.driver.execute_script(&quot;window.scrollBy(0, 100);&quot;)\n        self.driver.save_screenshot(self.screenshot_dir + &quot;screen_&quot; + str(self.product_id) + &quot;.png&quot;)\n\n        # \u5546\u54c1\u56fe\u7247\n        try:\n            div_slick = soup.select_one(&#039;div&#x5B;class=&quot;slick-list&quot;]&#039;)\n            if(len(div_slick) &gt; 0):\n                img_tags = div_slick.find_all(&#039;img&#039;)\n                self.delete_demo_item_images()\n                for img_tag in img_tags:\n                    all_items_images = &#x5B;]\n                    src = img_tag&#x5B;&#039;src&#039;]\n                    all_items_images.append({\n                        &quot;product_id&quot;: self.product_id,\n                        &quot;product_image&quot;: src,\n                    })\n\n                    # \u6570\u636e\u5e93insert\n                    self.insert_demo_item_images(all_items_images)\n        except:\n            error_message = &quot;demo product images is not exist.&quot;\n            logging.info(error_message)\n\n        # \u5546\u54c1\u4fe1\u606f\u53d6\u5f97\n        itemInfo = soup.select(&#039;div&#x5B;id=&quot;item-info&quot;]&#039;)\n        if(len(itemInfo) &gt; 0):\n            for item in itemInfo:\n                try:\n                    # \u5546\u54c1\u540d\n                    product_name = item.select(&#039;div.merHeading h1&#039;)&#x5B;0].text.strip()\n                    self.product_name = product_name\n\n                    # \u5546\u54c1\u72b6\u6001\n                    product_status = item.select(&#039;span&#x5B;data-testid=&quot;\u5546\u54c1\u72b6\u6001&quot;]&#039;)&#x5B;0].text.strip()\n\n                    all_items.append({\n                        &quot;product_id&quot;: self.product_id,\n                        &quot;product_url&quot;: self.products_url.format(self.product_id),\n                        &quot;product_name&quot;: self.product_name,\n                        &quot;product_status&quot;: product_status,\n                    })\n\n                except:\n                    error_message = &quot;demo product data get error : products_url=&#x5B;&quot; + self.products_url.format(self.product_id) + &quot;]\\n&quot;\n                    error_message += &quot;traceback.format_exc():\\n%s&quot; % traceback.format_exc() + &quot;\\n&quot;\n                    logging.info(error_message)\n\n                # \u5546\u54c1\u60c5\u62a5\u66f4\u65b0\n                self.update_demo_item(all_items)\n\n        else:\n            all_items.append({\n                &quot;product_id&quot;: self.product_id,\n                &quot;product_url&quot;: self.products_url.format(self.product_id),\n                &quot;product_name&quot;: &quot;&quot;,\n                &quot;product_status&quot;: &quot;&quot;,\n            })\n\n        logging.info(&quot;demo get data end.&quot;)\n    except:\n        self.error = 1\n        error_message = &quot;demo get data error : products_url=&#x5B;&quot; + self.products_url.format(self.product_id) + &quot;]\\n&quot;\n        error_message += &quot;traceback.format_exc():\\n%s&quot; % traceback.format_exc() + &quot;\\n&quot;\n        logging.info(error_message)\n        self.update_batch_data(self.error_status,error_message)\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898<\/h2>\n\n\n\n<details class=\"wp-block-details has-medium-font-size is-layout-flow wp-block-details-is-layout-flow\" open><summary> \u2605DevToolsActivePort file doesn&#8217;t exist<\/summary>\n<pre class=\"wp-block-preformatted has-medium-font-size\">\u25a0\u62a5\u9519\u4fe1\u606f\u5982\u4e0b\uff1a\nTraceback (most recent call last):\nFile \"\/www\/python\/demo\/demo.py\", line 985, in\nspider = demoSpider()\nFile \"\/www\/python\/demo\/demo.py\", line 64, in <strong>init<\/strong>\nself.driver = webdriver.Chrome(options = self.options)\nFile \"\/www\/python\/demo\/8c2886dca39e7b692cb378e704072ad4_venv\/lib64\/python3.6\/site-packages\/selenium\/webdriver\/chrome\/webdriver.py\", line 81, in <strong>init<\/strong>\ndesired_capabilities=desired_capabilities)\nFile \"\/www\/python\/demo\/8c2886dca39e7b692cb378e704072ad4_venv\/lib64\/python3.6\/site-packages\/selenium\/webdriver\/remote\/webdriver.py\", line 157, in <strong>init<\/strong>\nself.start_session(capabilities, browser_profile)\nFile \"\/www\/python\/demo\/8c2886dca39e7b692cb378e704072ad4_venv\/lib64\/python3.6\/site-packages\/selenium\/webdriver\/remote\/webdriver.py\", line 252, in start_session\nresponse = self.execute(Command.NEW_SESSION, parameters)\nFile \"\/www\/python\/demo\/8c2886dca39e7b692cb378e704072ad4_venv\/lib64\/python3.6\/site-packages\/selenium\/webdriver\/remote\/webdriver.py\", line 321, in execute\nself.error_handler.check_response(response)\nFile \"\/www\/python\/demo\/8c2886dca39e7b692cb378e704072ad4_venv\/lib64\/python3.6\/site-packages\/selenium\/webdriver\/remote\/errorhandler.py\", line 242, in check_response\nraise exception_class(message, screen, stacktrace)\nselenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist<\/pre>\n\n\n\n<p style=\"font-size:16px\">\u25a0\u89e3\u51b3\u6848\uff1a\u8ffd\u52a0\u4e0b\u8bb0\u53c2\u6570<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\noptions.add_argument(&quot;--remote-debugging-port=9222&quot;)\n<\/pre><\/div><\/details>\n\n\n\n<details class=\"wp-block-details has-medium-font-size is-layout-flow wp-block-details-is-layout-flow\" open><summary>\u2605chrome\u4e71\u7801<\/summary>\n<p style=\"font-size:16px\">\u25a0\u89e3\u51b3\u6848\uff1a\u8ffd\u52a0\u4e0b\u8bb0\u53c2\u6570<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nself.options.add_argument(&#039;--lang=ja&#039;)\n<\/pre><\/div><\/details>\n","protected":false},"excerpt":{"rendered":"<p>Python\u4f7f\u7528ChromeDriver\u548cSelenium\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u7f51\u7ad9\u6a21\u62df\u767b\u5f55\u3002\u8fd9\u79cd\u81ea\u52a8\u5316\u767b\u5f55\u7684\u6280\u672f\u4e3a\u5f00\u53d1\u4eba\u5458\u63d0\u4f9b\u4e86\u65b9\u4fbf\uff0c\u4f7f\u4ed6\u4eec\u80fd\u591f\u4ee5\u7f16\u7a0b\u65b9\u5f0f\u8bbf\u95ee\u548c\u64cd\u4f5c\u7f51\u7ad9\u3002\u901a\u8fc7\u7f16\u5199Python\u811a\u672c\uff0c\u4f7f\u7528ChromeDriver\u548cSelenium\u5e93\uff0c\u6211\u4eec\u53ef\u4ee5\u6a21\u62df\u7528\u6237\u767b\u5f55\u884c\u4e3a\uff0c\u5305\u62ec\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u3001\u70b9\u51fb\u767b\u5f55\u6309\u94ae\u7b49\u3002\u8fd9\u79cd\u81ea\u52a8\u5316\u767b\u5f55\u7684\u80fd\u529b\u5bf9\u4e8e\u8fdb\u884c\u7f51\u7ad9\u6d4b\u8bd5\u3001\u6570\u636e\u91c7\u96c6\u548c\u81ea\u52a8\u5316\u4efb\u52a1\u975e\u5e38\u6709\u7528\u3002\u65e0\u8bba\u662f\u4e3a\u4e86\u6d4b\u8bd5\u7f51\u7ad9\u7684\u529f\u80fd\uff0c\u8fd8\u662f\u4e3a\u4e86\u6279\u91cf\u5904\u7406\u6570\u636e\uff0cPython\u4e0eChromeDriver\u548cSelenium\u7684\u7ed3\u5408\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u5de5\u5177\u3002\u901a\u8fc7\u5229\u7528\u8fd9\u4e9b\u6280\u672f\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u7ba1\u7406\u7f51\u7ad9\u64cd\u4f5c\uff0c\u5e76\u8282\u7701\u5b9d\u8d35\u7684\u65f6\u95f4\u548c\u7cbe\u529b\u3002<\/p>\n","protected":false},"author":1,"featured_media":477,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,42],"tags":[43,44],"class_list":["post-471","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-selenium","tag-chromedriver","tag-selenium"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9 - \u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9<\/title>\n<meta name=\"description\" content=\"ChromeDriver \u662f\u4e00\u4e2a\u7528\u4e8e\u63a7\u5236 Chrome \u6d4f\u89c8\u5668\u7684 WebDriver\u3002Selenium \u662f\u4e00\u4e2a\u7528\u4e8e\u81ea\u52a8\u5316\u7f51\u9875\u6d4f\u89c8\u5668\u7684\u5de5\u5177\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528 Python\u3001ChromeDriver \u548c Selenium \u6765\u6a21\u62df\u767b\u9646\u7f51\u7ad9\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python\u4f7f\u7528chromedriver-selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9 - \u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9\" \/>\n<meta property=\"og:description\" content=\"ChromeDriver \u662f\u4e00\u4e2a\u7528\u4e8e\u63a7\u5236 Chrome \u6d4f\u89c8\u5668\u7684 WebDriver\u3002Selenium \u662f\u4e00\u4e2a\u7528\u4e8e\u81ea\u52a8\u5316\u7f51\u9875\u6d4f\u89c8\u5668\u7684\u5de5\u5177\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528 Python\u3001ChromeDriver \u548c Selenium \u6765\u6a21\u62df\u767b\u9646\u7f51\u7ad9\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python\u4f7f\u7528chromedriver-selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9\/\" \/>\n<meta property=\"og:site_name\" content=\"\u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-06T03:33:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-06T04:07:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/btc354.com\/wp-content\/uploads\/2023\/09\/cover-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1280\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@tqd354\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/btc354.com\\\/#\\\/schema\\\/person\\\/74f5bf75037e273d39381d4fcc0e8f93\"},\"headline\":\"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9\",\"datePublished\":\"2023-09-06T03:33:21+00:00\",\"dateModified\":\"2023-09-06T04:07:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/\"},\"wordCount\":24,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/#\\\/schema\\\/person\\\/00e13932981b0e8ae19d3ae6b5734178\"},\"image\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/cover-scaled.jpg\",\"keywords\":[\"chromeDriver\",\"selenium\"],\"articleSection\":[\"python\",\"selenium\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/\",\"url\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/\",\"name\":\"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9 - \u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/cover-scaled.jpg\",\"datePublished\":\"2023-09-06T03:33:21+00:00\",\"dateModified\":\"2023-09-06T04:07:17+00:00\",\"description\":\"ChromeDriver \u662f\u4e00\u4e2a\u7528\u4e8e\u63a7\u5236 Chrome \u6d4f\u89c8\u5668\u7684 WebDriver\u3002Selenium \u662f\u4e00\u4e2a\u7528\u4e8e\u81ea\u52a8\u5316\u7f51\u9875\u6d4f\u89c8\u5668\u7684\u5de5\u5177\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528 Python\u3001ChromeDriver \u548c Selenium \u6765\u6a21\u62df\u767b\u9646\u7f51\u7ad9\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/#primaryimage\",\"url\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/cover-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/cover-scaled.jpg\",\"width\":2560,\"height\":1280},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/2023\\\/09\\\/06\\\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/btc354.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/btc354.com\\\/#website\",\"url\":\"https:\\\/\\\/btc354.com\\\/\",\"name\":\"\u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9\",\"description\":\"tiro354\",\"publisher\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/#\\\/schema\\\/person\\\/00e13932981b0e8ae19d3ae6b5734178\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/btc354.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/btc354.com\\\/#\\\/schema\\\/person\\\/00e13932981b0e8ae19d3ae6b5734178\",\"name\":\"tan, keito\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/cropped-tiro354_logo7-1.png\",\"url\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/cropped-tiro354_logo7-1.png\",\"contentUrl\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/cropped-tiro354_logo7-1.png\",\"width\":1023,\"height\":1023,\"caption\":\"tan, keito\"},\"logo\":{\"@id\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/cropped-tiro354_logo7-1.png\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/tqd354\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/btc354.com\\\/#\\\/schema\\\/person\\\/74f5bf75037e273d39381d4fcc0e8f93\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/cropped-\u5fae\u4fe1\u56fe\u7247_20230820111625-96x96.png\",\"url\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/cropped-\u5fae\u4fe1\u56fe\u7247_20230820111625-96x96.png\",\"contentUrl\":\"https:\\\/\\\/btc354.com\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/cropped-\u5fae\u4fe1\u56fe\u7247_20230820111625-96x96.png\",\"caption\":\"admin\"},\"sameAs\":[\"http:\\\/\\\/btc354.com\"],\"url\":\"https:\\\/\\\/btc354.com\\\/index.php\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9 - \u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9","description":"ChromeDriver \u662f\u4e00\u4e2a\u7528\u4e8e\u63a7\u5236 Chrome \u6d4f\u89c8\u5668\u7684 WebDriver\u3002Selenium \u662f\u4e00\u4e2a\u7528\u4e8e\u81ea\u52a8\u5316\u7f51\u9875\u6d4f\u89c8\u5668\u7684\u5de5\u5177\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528 Python\u3001ChromeDriver \u548c Selenium \u6765\u6a21\u62df\u767b\u9646\u7f51\u7ad9\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python\u4f7f\u7528chromedriver-selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9\/","og_locale":"zh_CN","og_type":"article","og_title":"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9 - \u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9","og_description":"ChromeDriver \u662f\u4e00\u4e2a\u7528\u4e8e\u63a7\u5236 Chrome \u6d4f\u89c8\u5668\u7684 WebDriver\u3002Selenium \u662f\u4e00\u4e2a\u7528\u4e8e\u81ea\u52a8\u5316\u7f51\u9875\u6d4f\u89c8\u5668\u7684\u5de5\u5177\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528 Python\u3001ChromeDriver \u548c Selenium \u6765\u6a21\u62df\u767b\u9646\u7f51\u7ad9\u3002","og_url":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python\u4f7f\u7528chromedriver-selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9\/","og_site_name":"\u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9","article_published_time":"2023-09-06T03:33:21+00:00","article_modified_time":"2023-09-06T04:07:17+00:00","og_image":[{"width":2560,"height":1280,"url":"https:\/\/btc354.com\/wp-content\/uploads\/2023\/09\/cover-scaled.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_site":"@tqd354","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/#article","isPartOf":{"@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/"},"author":{"name":"admin","@id":"https:\/\/btc354.com\/#\/schema\/person\/74f5bf75037e273d39381d4fcc0e8f93"},"headline":"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9","datePublished":"2023-09-06T03:33:21+00:00","dateModified":"2023-09-06T04:07:17+00:00","mainEntityOfPage":{"@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/"},"wordCount":24,"commentCount":0,"publisher":{"@id":"https:\/\/btc354.com\/#\/schema\/person\/00e13932981b0e8ae19d3ae6b5734178"},"image":{"@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/#primaryimage"},"thumbnailUrl":"https:\/\/btc354.com\/wp-content\/uploads\/2023\/09\/cover-scaled.jpg","keywords":["chromeDriver","selenium"],"articleSection":["python","selenium"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/","url":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/","name":"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9 - \u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9","isPartOf":{"@id":"https:\/\/btc354.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/#primaryimage"},"image":{"@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/#primaryimage"},"thumbnailUrl":"https:\/\/btc354.com\/wp-content\/uploads\/2023\/09\/cover-scaled.jpg","datePublished":"2023-09-06T03:33:21+00:00","dateModified":"2023-09-06T04:07:17+00:00","description":"ChromeDriver \u662f\u4e00\u4e2a\u7528\u4e8e\u63a7\u5236 Chrome \u6d4f\u89c8\u5668\u7684 WebDriver\u3002Selenium \u662f\u4e00\u4e2a\u7528\u4e8e\u81ea\u52a8\u5316\u7f51\u9875\u6d4f\u89c8\u5668\u7684\u5de5\u5177\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528 Python\u3001ChromeDriver \u548c Selenium \u6765\u6a21\u62df\u767b\u9646\u7f51\u7ad9\u3002","breadcrumb":{"@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/#primaryimage","url":"https:\/\/btc354.com\/wp-content\/uploads\/2023\/09\/cover-scaled.jpg","contentUrl":"https:\/\/btc354.com\/wp-content\/uploads\/2023\/09\/cover-scaled.jpg","width":2560,"height":1280},{"@type":"BreadcrumbList","@id":"https:\/\/btc354.com\/index.php\/2023\/09\/06\/python%e4%bd%bf%e7%94%a8chromedriver-selenium%e6%a8%a1%e6%8b%9f%e7%99%bb%e9%99%86%e7%bd%91%e7%ab%99\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/btc354.com\/"},{"@type":"ListItem","position":2,"name":"python\u4f7f\u7528chromeDriver + selenium\u6a21\u62df\u767b\u9646\u7f51\u7ad9"}]},{"@type":"WebSite","@id":"https:\/\/btc354.com\/#website","url":"https:\/\/btc354.com\/","name":"\u4e2a\u4eba\u5b66\u4e60\u7ad9\u70b9","description":"tiro354","publisher":{"@id":"https:\/\/btc354.com\/#\/schema\/person\/00e13932981b0e8ae19d3ae6b5734178"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/btc354.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/btc354.com\/#\/schema\/person\/00e13932981b0e8ae19d3ae6b5734178","name":"tan, keito","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/btc354.com\/wp-content\/uploads\/2025\/01\/cropped-tiro354_logo7-1.png","url":"https:\/\/btc354.com\/wp-content\/uploads\/2025\/01\/cropped-tiro354_logo7-1.png","contentUrl":"https:\/\/btc354.com\/wp-content\/uploads\/2025\/01\/cropped-tiro354_logo7-1.png","width":1023,"height":1023,"caption":"tan, keito"},"logo":{"@id":"https:\/\/btc354.com\/wp-content\/uploads\/2025\/01\/cropped-tiro354_logo7-1.png"},"sameAs":["https:\/\/x.com\/tqd354"]},{"@type":"Person","@id":"https:\/\/btc354.com\/#\/schema\/person\/74f5bf75037e273d39381d4fcc0e8f93","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/btc354.com\/wp-content\/uploads\/2023\/08\/cropped-\u5fae\u4fe1\u56fe\u7247_20230820111625-96x96.png","url":"https:\/\/btc354.com\/wp-content\/uploads\/2023\/08\/cropped-\u5fae\u4fe1\u56fe\u7247_20230820111625-96x96.png","contentUrl":"https:\/\/btc354.com\/wp-content\/uploads\/2023\/08\/cropped-\u5fae\u4fe1\u56fe\u7247_20230820111625-96x96.png","caption":"admin"},"sameAs":["http:\/\/btc354.com"],"url":"https:\/\/btc354.com\/index.php\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/posts\/471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/comments?post=471"}],"version-history":[{"count":8,"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/posts\/471\/revisions"}],"predecessor-version":[{"id":489,"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/posts\/471\/revisions\/489"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/media\/477"}],"wp:attachment":[{"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/media?parent=471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/categories?post=471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/btc354.com\/index.php\/wp-json\/wp\/v2\/tags?post=471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}