{"id":127352,"date":"2020-06-08T12:03:52","date_gmt":"2020-06-08T04:03:52","guid":{"rendered":"http:\/\/4563.org\/?p=127352"},"modified":"2020-06-08T12:03:52","modified_gmt":"2020-06-08T04:03:52","slug":"python-selenium-%e4%b9%9f%e8%8e%b7%e5%8f%96%e4%b8%8d%e4%ba%86%e8%bf%99%e4%b8%aa%e7%bd%91%e9%a1%b5%e7%9a%84%e6%ba%90%e7%a0%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=127352","title":{"rendered":"Python + selenium \u4e5f\u83b7\u53d6\u4e0d\u4e86\u8fd9\u4e2a\u7f51\u9875\u7684\u6e90\u7801"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Python + selenium \u4e5f\u83b7\u53d6\u4e0d\u4e86\u8fd9\u4e2a\u7f51\u9875\u7684\u6e90\u7801               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : DonnyChao <\/span>  <span><i><\/i> 8<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6700\u8fd1\u6709\u4e2a\u7f51\u9875\u6574\u4f53\u7ffb\u8bd1\u7684\u9700\u6c42\uff0c\u770b\u4e86\u4e00\u4e0b\uff0cGoogle \u7f51\u9875\u7ffb\u8bd1\u662f\u6700\u4f18\u89e3\uff0c\u4f46\u662f\u4f7f\u7528 selenium \u4e5f\u83b7\u53d6\u4e0d\u4e86\u7f51\u9875\u7ffb\u8bd1\u540e\u7684\u6e90\u7801\u3002<\/p>\n<p>\u7f51\u9875\u5bf9\u8c61\u94fe\u63a5\uff08 Google \u7f51\u9875\u7ffb\u8bd1\u9875\u9762\uff09\uff1a https:\/\/translate.google.com.hk\/translate?hl=&amp;sl=en&amp;tl=zh-CN&amp;u=https:\/\/docs.python.org\/3\/tutorial\/index.html<\/p>\n<p>\u4f7f\u7528 selenium \u53d6\u8fd9\u4e2a\u7f51\u9875\u7684\u6e90\u7801\uff0c\u4f46\u662f\u53ea\u80fd\u83b7\u53d6\u5230 head \u6e90\u7801\uff0cbody \u4e3b\u8981\u7684\u4fe1\u606f\u83b7\u53d6\u4e0d\u5230\uff0c\u8bf7\u95ee\u6709\u4ec0\u4e48\u65b9\u6cd5\u80fd\u83b7\u53d6\u5230\u6574\u4e2a\u9875\u9762\u7684\u6e90\u7801\u5417\uff1f<\/p>\n<p>[img]https:\/\/p.pstatp.com\/origin\/ff450002d304a982cd55[\/img]<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>11<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"2081045\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : DonnyChao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ![image.png]( https:\/\/p.pstatp.com\/origin\/ff450002d304a982cd55)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081046\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : noqwerty <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Google \u7684 Cloud Translation \u53ef\u4ee5\u76f4\u63a5\u8c03 API \u7684\uff1a https:\/\/cloud.google.com\/translate\/docs\/                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081047\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : laoyur <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5904\u7406 iframe \u65f6\uff0c\u8981\u5148 driver.switch_to.frame(frames[0])\u4e00\u4e0b\u624d\u884c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081048\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 9yu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u68c0\u67e5\u6709\u6ca1\u6709 iframe                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081049\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiri <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e3a\u4ec0\u4e48\u4e0d\u76f4\u63a5\u8c03\u7528 API                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081050\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jizhihaoSAMA <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             iframe \u6b63\u89e3                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081051\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : DonnyChao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @laoyur <br \/>@9yu <\/p>\n<p>\u662f iframe \u539f\u56e0\uff0c\u5df2\u6309 3 \u65b9\u6cd5\u89e3\u51b3\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081052\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : DonnyChao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xiri Google \u7ffb\u8bd1 API \u770b\u7f51\u4e0a\u6559\u7a0b\u8bf4\uff0c\u4e0d\u80fd\u7ffb\u8bd1 HTML \u6587\u4ef6\uff0c\u53ea\u80fd\u7ffb\u8bd1\u6587\u672c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081053\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sxd96 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u53ea\u662f\u8fd9\u4e2a\u7f51\u9875\u7684\u8bdd\uff0c\u4f60\u77e5\u4e0d\u77e5\u9053\u8fd9\u6709\u4e2d\u6587\u9009\u9879&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081054\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : polarpy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6b63\u89e3                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2081055\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yucongo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 Pyppeteer \u5427\uff0c\u8fd8\u80fd\u5f02\u6b65\u64cd\u4f5c\u3002\u6709\u73b0\u6210\u7684\u57fa\u4e8e Pyppeteer \u7684\u5305 https:\/\/pypi.org\/project\/deepl-tr-async\/ pip install deepl-tr-async\uff0c\u53ef\u5f02\u6b65\u8c03 google \u7ffb\u8bd1\u6216 deepl                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Python + selenium&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/127352"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=127352"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/127352\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=127352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=127352"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=127352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}