{"id":1854,"date":"2019-02-10T07:50:24","date_gmt":"2020-02-12T13:55:45","guid":{"rendered":"http:\/\/vip.fxxkpython.com\/?p=1854"},"modified":"2020-02-12T21:55:49","modified_gmt":"2020-02-12T13:55:49","slug":"7af7b1f69e","status":"publish","type":"post","link":"https:\/\/vip.fxxkpython.com\/?p=1854","title":{"rendered":"python\u722c\u866b09 | \u4e0a\u6765\uff0c\u81ea\u5df1\u52a8 \uff01\u8fd9\u5c31\u662f selenium \u7684\u725b\u903c\u4e4b\u5904"},"content":{"rendered":"<div class=\"bpp-post-content\">\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\" ><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u4f5c\u4e3a\u4e00\u4e2a\u7537\u4eba<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5728\u6700\u9ad8\u5149\u7684\u65f6\u523b<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5c31\u662f\u8bf4\u51fa\u90a3\u53e5<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     style=\"letter-spacing: 2px;text-align: center;white-space: normal;\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python8-1581515746.gif\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u4e4b\u540e<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8fd8\u4e0d\u4f1a\u88ab\u4eba\u6253<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">&#8230;<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u867d\u7136\u5728\u73b0\u5b9e\u751f\u6d3b\u4e2d\u4f60\u65e0\u6cd5\u8fd9\u6837<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u4f46\u662f\u5728\u8fd9\u91cc<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5c31\u8ba9\u4f60\u4f53\u9a8c\u4e00\u756a<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u90a3\u79cd\u547c\u98ce\u5524\u96e8\u7684\u611f\u89c9<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python7-1581515746.jpeg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6211\u4eec\u4e4b\u524d\u5728\u722c\u53d6\u67d0\u4e9b\u7f51\u7ad9\u7684\u65f6\u5019<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u4f7f\u7528\u5230\u4e86\u4e00\u4e9b python \u7684\u8bf7\u6c42\u5e93<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6a21\u62df\u6d4f\u89c8\u5668\u7684\u8bf7\u6c42<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6211\u4eec\u9700\u8981\u6293\u5305\u5565\u7684<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u80fd\u4e0d\u80fd\u4e0d\u8fd9\u6837<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u53ef\u4e0d\u53ef\u4ee5\u5c31\u5199\u51e0\u884c\u4ee3\u7801<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8ba9\u5b83\u81ea\u5df1\u53bb\u6253\u5f00\u6d4f\u89c8\u5668<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u81ea\u5df1\u53bb\u8bf7\u6c42\u6211\u4eec\u8981\u722c\u53d6\u7684\u7f51\u7ad9<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u81ea\u5df1\u53bb\u6a21\u62df\u6211\u4eec\u7684\u4e00\u4e9b\u641c\u7d22<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u7b49\u7b49<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u53cd\u6b63\u5c31\u662f<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8001\u5b50\u8eba\u7740\uff0c\u8ba9\u5b83\u81ea\u5df1\u52a8<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     style=\"width: 56%;height: auto !important;\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python8-1581515746.jpg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: center;letter-spacing: 2px;\">\u8eba\u597d<\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: center;letter-spacing: 2px;\">\u8ba9 selenium \u6ee1\u8db3\u4f60\u7684\u8981\u6c42<\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: center;letter-spacing: 2px;\">\u600e\u4e48\u73a9\u5462\uff1f<\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: center;letter-spacing: 2px;\">\u90a3\u4e48\u63a5\u4e0b\u91cc\u5c31\u662f<\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: center;letter-spacing: 2px;\"><span style=\"background-color: rgb(255, 0, 0);color: rgb(255, 255, 255);\"><strong>\u5b66\u4e60 python \u7684\u6b63\u786e\u59ff\u52bf<\/strong><\/span><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     style=\"width: 49%;height: auto !important;\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python8-1581515746-1.jpg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u4ec0\u4e48\u662f selenium \uff1f<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5176\u5b9e\u5b83\u5c31\u662f\u4e00\u4e2a\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u5177\uff0c\u652f\u6301\u5404\u79cd\u4e3b\u6d41\u7684\u6d4f\u89c8\u5668<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u76f4\u5230\u9047\u5230\u4e86 python<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8f6c\u8eab\u4e00\u53d8<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python7-1581515747.jpeg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">selenium \u53d8\u6210\u4e86\u722c\u866b\u5229\u5668<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6211\u4eec\u5148\u6765\u5b89\u88c5\u4e00\u4e0b<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\">pip <span class=\"hljs-default-keyword\" style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 46px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">install<\/span> selenium<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u63a5\u7740\u6211\u4eec\u8fd8\u8981\u4e0b\u8f7d\u6d4f\u89c8\u5668\u9a71\u52a8<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5c0f\u5e05b\u7528\u7684\u662f Chrome \u6d4f\u89c8\u5668<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6240\u4ee5\u4e0b\u8f7d\u7684\u662f Chrome \u9a71\u52a8<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5f53\u7136\u4f60\u7528\u522b\u7684\u6d4f\u89c8\u5668\u4e5f\u9614\u4ee5<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u53bb\u76f8\u5e94\u7684\u5730\u65b9\u4e0b\u8f7d\u5c31\u884c\u4e86<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<table class=\"docutils\" style=\"letter-spacing: 2px;\">\n<tbody valign=\"top\">\n<tr class=\"row-odd\">\n<td style=\"padding: 0.25em 0.7em;border-color: rgb(136, 136, 136);word-break: break-all;\" width=\"159\"><strong>Chrome<\/strong>:<\/td>\n<td style=\"padding: 0.25em 0.7em;border-color: rgb(136, 136, 136);word-break: break-all;\" width=\"353\">https:\/\/sites.google.com\/a\/chromium.org\/chromedriver\/downloads<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td style=\"padding: 0.25em 0.7em;border-color: rgb(136, 136, 136);word-break: break-all;\" width=\"104\"><strong>Edge<\/strong>:<\/td>\n<td style=\"padding: 0.25em 0.7em;border-color: rgb(136, 136, 136);word-break: break-all;\" width=\"353\">https:\/\/developer.microsoft.com\/en-us\/microsoft-edge\/tools\/webdriver\/<\/td>\n<\/tr>\n<tr class=\"row-odd\">\n<td style=\"padding: 0.25em 0.7em;border-color: rgb(136, 136, 136);word-break: break-all;\" width=\"104\"><strong>Firefox<\/strong>:<\/td>\n<td style=\"padding: 0.25em 0.7em;border-color: rgb(136, 136, 136);word-break: break-all;\" width=\"353\">https:\/\/github.com\/mozilla\/geckodriver\/releases<\/td>\n<\/tr>\n<tr class=\"row-even\">\n<td style=\"padding: 0.25em 0.7em;border-color: rgb(136, 136, 136);word-break: break-all;\" width=\"104\"><strong>Safari<\/strong>:<\/td>\n<td style=\"padding: 0.25em 0.7em;border-color: rgb(136, 136, 136);word-break: break-all;\" width=\"353\">https:\/\/webkit.org\/blog\/6900\/webdriver-support-in-safari-10\/<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u4e0b\u8f7d\u5b8c\u4e4b\u540e<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8981\u914d\u7f6e\u4e00\u4e0b\u73af\u5883\u53d8\u91cf<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\"><img decoding=\"async\" class=\" aligncenter\"       style=\"\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python8-1581515747.jpg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u63a5\u7740\u6253\u5f00 pycharm<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u64b8\u70b9\u4ee3\u7801<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\">from selenium import webdriver<br  \/><br  \/>driver = webdriver.Chrome()<br  \/>driver.<span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 20px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">get<\/span>(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 152px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"https:\/\/www.baidu.com\"<\/span>)<br  \/><br  \/><span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">input<\/span> = driver.find_element_by_css_selector(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'#kw'<\/span>)<br  \/><span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">input<\/span>.send_keys(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 74px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"\u82cd\u8001\u5e08\u7167\u7247\"<\/span>)<br  \/><br  \/>button = driver.find_element_by_css_selector(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'#su'<\/span>)<br  \/>button.click()<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8fd0\u884c\u4e00\u4e0b<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\" aligncenter\"      style=\"\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python4-1581515747.gif\" alt=\"python\" title=\"python\"><\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u53ef\u4ee5\u770b\u5230<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5b83\u81ea\u5df1\u6253\u5f00\u4e86 Chrome \u6d4f\u89c8\u5668<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8bbf\u95ee\u4e86\u767e\u5ea6<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u641c\u7d22\u4e86\u82cd\u8001\u5e08\u7684\u7167\u7247<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python0-1581515747.gif\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8fd9\u5c31\u662f&nbsp;<span style=\"letter-spacing: 2px;text-align: center;\">selenium \u7684\u9b45\u529b<\/span><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><span style=\"letter-spacing: 2px;text-align: center;\"><br  \/><\/span><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><span style=\"letter-spacing: 2px;text-align: center;\">\u6211\u4eec\u6765\u770b\u4e0b\u6211\u4eec\u521a\u521a\u5199\u7684\u4ee3\u7801<\/span><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><span style=\"letter-spacing: 2px;text-align: center;\"><br  \/><\/span><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><span style=\"letter-spacing: 2px;text-align: center;\">\u6211\u4eec\u5bfc\u5165\u4e86 web \u9a71\u52a8\u6a21\u5757<\/span><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><span style=\"letter-spacing: 2px;text-align: center;\"><br  \/><\/span><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-keyword\" style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 26px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">from<\/span> selenium <span class=\"hljs-default-keyword\" style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 40px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">import<\/span> webdriver<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><span style=\"letter-spacing: 2px;text-align: center;\"><\/span><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u63a5\u7740\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a Chrome \u9a71\u52a8<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">driver<\/span> = webdriver.Chrome()<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6709\u4e86\u5b9e\u4f8b\u4e4b\u540e<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u76f8\u5f53\u4e8e\u6211\u4eec\u6709\u4e86 Chrome \u6d4f\u89c8\u5668\u4e86<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u63a5\u7740\u4f7f\u7528 get \u65b9\u6cd5\u6253\u5f00\u767e\u5ea6<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\">driver.<span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 20px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">get<\/span>(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 152px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"https:\/\/www.baidu.com\"<\/span>)<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6253\u5f00\u767e\u5ea6\u4e4b\u540e<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6211\u4eec\u83b7\u53d6\u5230\u8f93\u5165\u6846<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u81f3\u4e8e\u600e\u4e48\u83b7\u53d6<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u7b49\u7b49\u4f1a\u8bb2<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u83b7\u53d6\u5230\u8f93\u5165\u6846\u4e4b\u540e\u6211\u4eec\u5c31\u5f80\u91cc\u9762\u5199\u5165\u6211\u4eec\u8981\u641c\u7d22\u7684\u5185\u5bb9<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">input<\/span> = driver.find_element_by_css_selector(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'#kw'<\/span>)<br  \/><span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">input<\/span>.send_keys(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 74px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"\u82cd\u8001\u5e08\u7167\u7247\"<\/span>)<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8f93\u5165\u5b8c\u4e86\u4e4b\u540e\u5462<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6211\u4eec\u5c31\u83b7\u53d6\u5230\u641c\u7d22\u8fd9\u4e2a\u6309\u94ae<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u7136\u540e\u70b9\u51fb<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-attribute\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">button<\/span> = driver.find_element_by_css_selector(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'#su'<\/span>)<br  \/>button.click()<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5c31\u8fd9\u6837\u5b8c\u6210\u4e86\u4e00\u6b21\u81ea\u52a8\u7684\u767e\u5ea6\u641c\u7d22<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python10-1581515747.gif\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5f53\u6211\u4eec\u4f7f\u7528\u9a71\u52a8\u6253\u5f00\u4e86\u4e00\u4e2a\u9875\u9762<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8fd9\u65f6\u5019\u5176\u5b9e\u6ca1\u4ec0\u4e48\u9e1f\u7528<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u56e0\u4e3a\u6211\u4eec\u8981\u5bf9\u90a3\u4e9b\u5143\u7d20\u8fdb\u884c\u64cd\u4f5c<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5c31\u50cf\u521a\u521a\u6211\u4eec\u8981\u83b7\u53d6\u8f93\u5165\u6846\u7136\u540e\u8f93\u5165\u4e00\u4e9b\u5185\u5bb9<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8fd8\u6709\u83b7\u53d6\u6309\u94ae\u70b9\u51fb\u4ec0\u4e48\u7684<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">selenium \u63d0\u4f9b\u4e86\u633a\u591a\u65b9\u6cd5\u7ed9\u6211\u4eec\u83b7\u53d6\u7684<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5f53\u6211\u4eec\u8981\u5728\u9875\u9762\u4e2d\u83b7\u53d6\u4e00\u4e2a\u5143\u7d20\u7684\u65f6\u5019<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<ul class=\"simple list-paddingleft-2\" style=\"\">\n<li>\n<p><cite>find_element_by_id<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_element_by_name<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_element_by_xpath<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_element_by_link_text<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_element_by_partial_link_text<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_element_by_tag_name<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_element_by_class_name<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_element_by_css_selector<\/cite><\/p>\n<\/li>\n<\/ul>\n<p style=\"letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"letter-spacing: 2px;\"><cite><br  \/><\/cite><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u60f3\u8981\u5728\u9875\u9762\u83b7\u53d6\u591a\u4e2a\u5143\u7d20\u5462<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5c31\u53ef\u4ee5\u8fd9\u6837<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<ul class=\"simple list-paddingleft-2\" style=\"\">\n<li>\n<p><cite>find_elements_by_name<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_elements_by_xpath<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_elements_by_link_text<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_elements_by_partial_link_text<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_elements_by_tag_name<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_elements_by_class_name<\/cite><\/p>\n<\/li>\n<li>\n<p><cite>find_elements_by_css_selector<\/cite><\/p>\n<\/li>\n<\/ul>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6bd4\u5982\u6211\u4eec\u6253\u5f00\u4e86\u4e00\u4e2a\u9875\u9762<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u662f\u8fd9\u6837\u7684 HTML<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-symbol\" style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">&lt;html&gt;<\/span><br  \/> <span class=\"hljs-default-symbol\" style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 40px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">&lt;body&gt;<\/span><br  \/> &nbsp;&lt;form id=<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 73px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"loginForm\"<\/span>&gt;<br  \/> &nbsp; &lt;<span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">input<\/span> name=<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"username\"<\/span> <span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 27px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">type<\/span>=<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 40px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"text\"<\/span> \/&gt;<br  \/> &nbsp; &lt;<span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">input<\/span> name=<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"password\"<\/span> <span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 27px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">type<\/span>=<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"password\"<\/span> \/&gt;<br  \/> &nbsp; &lt;<span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">input class=\"login\"<\/span>&nbsp;name=<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"continue\"<\/span> <span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 27px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">type<\/span>=<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 53px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"submit\"<\/span> value=<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 46px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"Login\"<\/span> \/&gt;<br  \/> &nbsp;&lt;\/form&gt;<br  \/> &lt;\/body&gt;<br  \/><span class=\"hljs-default-symbol\" style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">&lt;html&gt;<\/span><\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u53ef\u4ee5\u901a\u8fc7 id \u83b7\u53d6 form \u8868\u5355<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">login_form<\/span> = driver.find_element_by_id(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 73px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'loginForm'<\/span>)<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u901a\u8fc7 name \u83b7\u53d6\u76f8\u5e94\u7684\u8f93\u5165\u6846<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 53px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">username<\/span> = driver.find_element_by_name(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'username'<\/span>)<br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 53px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">password<\/span> = driver.find_element_by_name(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'password'<\/span>)<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u901a\u8fc7 xpath \u83b7\u53d6\u8868\u5355<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">login_form<\/span> = driver.find_element_by_xpath(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 132px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"\/html\/body\/form[1]\"<\/span>)<br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">login_form<\/span> = driver.find_element_by_xpath(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 72px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"\/\/form[1]\"<\/span>)<br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">login_form<\/span> = driver.find_element_by_xpath(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 165px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"\/\/form[@id='loginForm']\"<\/span>)<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u901a\u8fc7\u6807\u7b7e\u83b7\u53d6\u76f8\u5e94\u7684\u8f93\u5165\u6846<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">input1<\/span> = driver.find_element_by_tag_name(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 46px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'input'<\/span>)<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u901a\u8fc7 class \u83b7\u53d6\u76f8\u5e94\u7684\u5143\u7d20<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span style=\"color:#d19a66;\">login&nbsp;<\/span><span style=\"color: rgb(171, 178, 191);\">= driver.find_element_by_class_name(<span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 59px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'login'<\/span>)<\/span><\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u7528 Chrome \u6d4f\u89c8\u5668\u7684\u5ba1\u6838\u5143\u7d20<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u53ef\u4ee5\u5f88\u65b9\u4fbf\u83b7\u53d6\u76f8\u5e94\u7684\u5c5e\u6027<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u76f4\u63a5 copy \u5c31\u5b8c\u4e8b\u4e86<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\"><img decoding=\"async\" class=\" aligncenter\"      style=\"\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python4-1581515748.gif\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5982\u679c\u4f60\u89c9\u5f97<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\"><cite>find_element_by_xxx_xxx<\/cite><\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\">\u592a\u957f\u4e86<\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\">\u90a3\u4e48\u4f60\u8fd8\u53ef\u4ee5\u8fd9\u6837<\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-selector-tag\" style=\"color: rgb(224, 108, 117);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(224, 108, 117);font-weight: 400;font-style: normal;\">driver<\/span><span class=\"hljs-default-selector-class\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 93px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">.find_elements<\/span>(By.ID, <span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">'xxx'<\/span>)<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\">By.\u5c5e\u6027\u548c\u4e0a\u9762\u7684\u662f\u4e00\u6837\u7684<\/p>\n<p style=\"text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\" style=\"letter-spacing: 2px;\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 13px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">ID<\/span> = <span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 26px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"id\"<\/span><br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">XPATH<\/span> = <span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 46px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"xpath\"<\/span><br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 59px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">LINK_TEXT<\/span> = <span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 73px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"link text\"<\/span><br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 112px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">PARTIAL_LINK_TEXT<\/span> = <span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 125px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"partial link text\"<\/span><br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 26px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">NAME<\/span> = <span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 40px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"name\"<\/span><br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 53px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">TAG_NAME<\/span> = <span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"tag name\"<\/span><br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 66px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">CLASS_NAME<\/span> = <span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 79px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"class name\"<\/span><br  \/><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 79px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">CSS_SELECTOR<\/span> = <span class=\"hljs-default-string\" style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 92px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\"css selector\"<\/span><\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5f53\u7136<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6211\u4eec\u73a9\u7684\u662f\u722c\u866b<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8981\u7684\u5c31\u662f\u6e90\u4ee3\u7801<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u6211\u4eec\u5df2\u7ecf\u77e5\u9053<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u901a\u8fc7<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-attr\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">driver<\/span> = webdriver.Chrome()<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u53ef\u4ee5\u62ff\u5230\u6d4f\u89c8\u5668\u5bf9\u8c61<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u90a3\u4e48\u8981\u83b7\u53d6\u6e90\u4ee3\u7801\u8fd8\u4e0d\u7b80\u5355\u4e48\uff1f<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u83b7\u53d6\u8bf7\u6c42\u94fe\u63a5<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-selector-tag\" style=\"color: rgb(224, 108, 117);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(224, 108, 117);font-weight: 400;font-style: normal;\">driver<\/span><span class=\"hljs-default-selector-class\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 80px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">.current_url<\/span><\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u83b7\u53d6 cookies<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-selector-tag\" style=\"color: rgb(224, 108, 117);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(224, 108, 117);font-weight: 400;font-style: normal;\">driver<\/span><span class=\"hljs-default-selector-class\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 73px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">.get_cookies()<br  \/><\/span><\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u83b7\u53d6\u6e90\u4ee3\u7801<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-selector-tag\" style=\"color: rgb(224, 108, 117);background: rgba(0, 0, 0, 0);display: inline;width: 39px;text-decoration: none solid rgb(224, 108, 117);font-weight: 400;font-style: normal;\">driver<\/span><span class=\"hljs-default-selector-class\" style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 86px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">.page_source<\/span><\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u83b7\u53d6\u6587\u672c\u7684\u503c<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<section   class=\"mpa-template\" mpa-preserve=\"t\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 6px;overflow-x: auto;white-space: nowrap;\" class=\"hljs-default\"><span class=\"hljs-default-built_in\" style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 33px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">input<\/span>.text<\/code><\/pre>\n<\/section>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">ok<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u4ee5\u4e0a\u5c31\u662f selenium \u7684\u5e38\u7528\u65b9\u6cd5<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u60f3\u8981\u4e86\u89e3\u66f4\u591a\u76f8\u5173 selenium \u7684\u53ef\u4ee5\u5230\u5b98\u65b9\u6587\u6863\u67e5\u770b<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><span style=\"color: rgb(0, 82, 255);\">https:\/\/selenium-python.readthedocs.io\/<\/span><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u4e0b\u4e00\u6b21<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">&nbsp;<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u5c0f\u5e05b\u5c06\u5e26\u4f60\u4f7f\u7528\u5b83\u6765\u722c\u53d6\u7f51\u7ad9<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python8-1581515748.jpeg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u672c\u7bc7\u5b8c<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u518d\u89c1<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u8fd1\u671f\u6587\u7ae0<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzU2ODYzNTkwMg==&amp;mid=2247484156&amp;idx=1&amp;sn=dc732b380d162f39ff63d55cac5a0dd6&amp;chksm=fc8bba6dcbfc337b1377dc15d1ab26c3dc1879c669fb1721f0463a12efbcd51b3aad728fcc62&amp;scene=21#wechat_redirect\" target=\"_blank\" >python\u722c\u866b08 | \u4f60\u7684\u7b2c\u4e8c\u4e2a\u722c\u866b\uff0c\u8981\u8fc7\u5e74\u4e86\uff0c\u722c\u53d6\u8c46\u74e3\u6700\u53d7\u6b22\u8fce\u7684250\u90e8\u7535\u5f71\u6162\u6162\u770b<\/a><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzU2ODYzNTkwMg==&amp;mid=2247484147&amp;idx=1&amp;sn=ea755f668585d237622e897a73ef6549&amp;chksm=fc8bba62cbfc3374e3fd2e98167a8da6f6e9ea48c1564c9006a1b487707f5387d59c15fe3c3a&amp;scene=21#wechat_redirect\" target=\"_blank\" >python\u722c\u866b07 | \u6709\u4e86 BeautifulSoup \uff0c\u5988\u5988\u518d\u4e5f\u4e0d\u7528\u62c5\u5fc3\u6211\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u4e86<\/a><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzU2ODYzNTkwMg==&amp;mid=2247484142&amp;idx=1&amp;sn=d4893c734e44a16db871f7904910bdcb&amp;chksm=fc8bba7fcbfc336964aa4ee74d490098024479e663b9a83e7ca8e7b4ec876009a9f497462c77&amp;scene=21#wechat_redirect\" target=\"_blank\" >python\u722c\u866b06 | \u4f60\u7684\u7b2c\u4e00\u4e2a\u722c\u866b\uff0c\u722c\u53d6\u5f53\u5f53\u7f51 Top 500 \u672c\u4e94\u661f\u597d\u8bc4\u4e66\u7c4d<\/a><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 3px;text-align: center;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python3-1581515748.gif\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 3px;text-align: center;\"><strong><span style=\"letter-spacing: 2px;text-align: center;\">\u626b\u4e00\u626b<\/span><\/strong><\/p>\n<p style=\"margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 3px;text-align: center;\"><strong><span style=\"letter-spacing: 2px;text-align: center;\">\u5b66\u4e60 Python \u6ca1\u70e6\u607c<\/span><\/strong><\/p>\n<p style=\"margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 3px;text-align: center;\"><strong><span style=\"letter-spacing: 2px;text-align: center;\"><br  \/><\/span><\/strong><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\" aligncenter\"       style=\"width: 69%;height: auto !important;box-shadow: rgb(170, 170, 170) 0em 0em 1em 0px;\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python3-1581515748.jpeg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u575a\u6301\u539f\u521b<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\">\u7ed9\u5c0f\u5e05b\u6765\u4e2a\u597d\u770b<\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: right;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><img decoding=\"async\" class=\"mpa-image aligncenter\"     src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python1-1581515749.jpeg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<p style=\"text-align: center;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 2px;\"><br  \/><\/p>\n<blockquote class=\"keep-source\">\n<p>\u539f\u6587\u59cb\u53d1\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7\uff08\u5b66\u4e60python\u7684\u6b63\u786e\u59ff\u52bf\uff09\uff1a<a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzU2ODYzNTkwMg==&#038;mid=2247484164&#038;idx=1&#038;sn=174af324601e22f9809f058760233121&#038;chksm=fc8bbb95cbfc328356c4c7358ef4d25146ac382660dd2a91efe8e132ef4364dab9aa9ef8069a\">python<\/a><\/p>\n<\/blockquote>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u4e3a\u4e00\u4e2a\u7537\u4eba \u5728\u6700\u9ad8\u5149\u7684\u65f6\u523b \u5c31\u662f\u8bf4\u51fa\u90a3\u53e5 \u4e4b\u540e \u8fd8\u4e0d\u4f1a\u88ab\u4eba\u6253 &#8230; \u867d\u7136\u5728\u73b0\u5b9e\u751f\u6d3b\u4e2d\u4f60\u65e0\u6cd5\u8fd9\u6837 \u4f46\u662f\u5728\u8fd9\u91cc \u5c31\u8ba9\u4f60\u4f53\u9a8c\u4e00\u756a \u90a3\u79cd\u547c\u98ce\u5524\u96e8\u7684\u611f\u89c9 \u6211\u4eec\u4e4b\u524d\u5728\u722c\u53d6\u67d0\u4e9b\u7f51\u7ad9\u7684\u65f6\u5019 \u4f7f\u7528\u5230\u4e86\u4e00\u4e9b python \u7684\u8bf7\u6c42\u5e93 \u6a21\u62df\u6d4f\u89c8\u5668\u7684\u8bf7\u6c42 \u6211\u4eec\u9700\u8981&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1855,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[303],"tags":[302,19,300,301],"_links":{"self":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/1854"}],"collection":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1854"}],"version-history":[{"count":1,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/1854\/revisions"}],"predecessor-version":[{"id":1870,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/1854\/revisions\/1870"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/media\/1855"}],"wp:attachment":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}