{"id":269059,"date":"2021-01-09T12:08:39","date_gmt":"2021-01-09T04:08:39","guid":{"rendered":"http:\/\/4563.org\/?p=269059"},"modified":"2021-01-09T12:08:39","modified_gmt":"2021-01-09T04:08:39","slug":"python-%e5%81%9a%e6%a8%a1%e6%8b%9f%e9%bc%a0%e6%a0%87%e6%93%8d%e4%bd%9c%ef%bc%8c%e8%bf%99%e4%b8%aa%e6%80%9d%e8%b7%af%e5%8f%af%e4%bb%a5%e4%b9%88%e3%80%82","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=269059","title":{"rendered":"Python \u505a\u6a21\u62df\u9f20\u6807\u64cd\u4f5c\uff0c\u8fd9\u4e2a\u601d\u8def\u53ef\u4ee5\u4e48\u3002"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Python \u505a\u6a21\u62df\u9f20\u6807\u64cd\u4f5c\uff0c\u8fd9\u4e2a\u601d\u8def\u53ef\u4ee5\u4e48\u3002               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jmyz0455 <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u4e00\u597d\u54e5\u4eec\u5e72\u5e02\u573a\u8425\u9500\uff0c\u8001\u5410\u69fd\u516c\u53f8\u7528\u7684\u5783\u573e\u7edf\u8ba1\u8f6f\u4ef6\uff0c\u53ea\u80fd\u5bfc\u51fa\u4e00\u4e2a\u5206\u9875\u7684 Excel \u6570\u636e\u3002\u60f3\u8981\u591a\u5bfc\u51fa\u51e0\u4e2a\u5206\u9875\u7684\u5185 \u5bb9\uff0c\u53ea\u80fd\u624b\u52a8\u4e0b\u8f7d\u51e0\u6b21 Excel \u7136\u540e\u624b\u52a8\u5408\u5e76\u8868\uff0c\u6548\u7387\u8d3c\u4f4e\u3002\u8981\u6c42\u8f6f\u4ef6\u516c\u53f8\u52a0\u529f\u80fd\u4e00\u76f4\u90fd\u6ca1\u4e0b\u6587\uff0c\u95ee\u6211\u80fd\u4e0d\u80fd\u7528\u4ee3\u7801 \u5e2e\u5e2e\u4ed6\u3002<\/p>\n<p>\u6700\u8fd1\u4e0a\u73ed\u95f2\u4e86\uff0c\u7b54\u5e94\u7ed9\u4ed6\u641e\uff0c\u4e00\u5f00\u59cb\u6211\u7684\u60f3\u6cd5\u5c31\u662f\u7528 Fiddler \u6293\u5305\u53d1\u8bf7\u6c42\uff0c\u7ed3\u679c\u53d1\u73b0\u8f6f\u4ef6\u5c45\u7136\u7528\u4e86\u5355\u70b9\u767b\u5f55\uff0c\u6bcf\u6b21 \u4ee3\u7801\u767b\u5f55\u540e\u5c31\u628a\u4ed6\u8e22\u4e0b\u7ebf\u4e86\uff0c\u4e0d\u5b8c\u7f8e\u3002\u6240\u4ee5\u6211\u60f3\u5230\u4e86\u7528 python \u5199\u4e00\u4e2a\u6a21\u62df\u64cd\u4f5c\u7a0b\u5e8f\uff0c\u6211\u7684\u601d\u8def\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u83b7\u53d6 Windows \u7a97\u53e3\u53e5\u67c4\uff0c\u628a\u8f6f\u4ef6\u79fb\u5230 <code>(0,0)<\/code> \u7684\u4f4d\u7f6e\u3002<\/li>\n<li>\u7f51\u4e0a\u641c\u5230\u4e2a\u7528\u4e8e\u8bc6\u522b\u6587\u5b57\u7684 pytesseract \u5e93\uff0c\u8bc6\u522b\u8f6f\u4ef6\u67d0\u4e2a\u533a\u57df\u7684\u6587\u5b57\u662f\u5426\u7b49\u4e8e\u671f\u671b\u503c\u3002<\/li>\n<li>\u63a5 2. \u4e3a\u771f\u7684\u65f6\u5019\uff0c\u7f51\u4e0a\u641c\u5230\u4e2a\u7528\u4e8e\u79fb\u52a8\u9f20\u6807\u5230 PyAutoGUI \u5e93\uff0c\u70b9\u51fb\u5bf9\u5e94\u5750\u6807\u5b8c\u6210\u64cd\u4f5c\u3002<\/li>\n<li>\u5982\u679c 2. \u9047\u5230\u4e86\u56fe\u7247\uff0c\u7f51\u4e0a\u641c\u5230\u4e2a\u7528\u4e8e\u56fe\u50cf\u5bf9\u6bd4\u7684 Pillow \u5e93\uff0c\u901a\u8fc7\u5bf9\u6bd4\u989c\u8272\u5206\u5e03\u6216\u7070\u5ea6\u8fa8\u8ba4\u662f\u4e0d\u662f\u671f\u671b\u56fe\u7247\u3002<\/li>\n<li>\u6700\u540e\u628a\u4e0b\u8f7d\u5230\u7684 Excel \u6587\u4ef6\u7528 xlrd \u548c csv \u6a21\u5757\u8f6c\u6362\u6210 CSV \u6587\u4ef6\u7136\u540e\u62fc\u63a5\u6570\u636e\u518d\u8f6c\u6362\u6210 Excel \u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p>\u6211\u6ca1\u5199\u8fc7\u6a21\u62df\u64cd\u4f5c\uff0c\u4e0a\u9762\u7528\u5230\u7684\u5e93\u548c\u6a21\u5757\u90fd\u662f\u641c\u51fa\u6765\u7684\uff0c\u5927\u6982\u60f3\u6cd5\u5c31\u662f\u8fd9\u6837\uff0c\u56e0\u4e3a\u6ca1\u6709\u7ecf\u9a8c\uff0c\u6240\u4ee5\u60f3\u542c\u542c\u5927\u5bb6\u7684\u610f\u89c1\uff0c\u601d\u8def\u6709\u6ca1\u6709\u53ef\u4ee5\u6539\u8fdb\u7684\u5730\u65b9\uff0c\u5e93\u548c\u6a21\u5757\u6709\u6ca1\u6709\u66f4\u7b26\u5408\u9700\u6c42\u7684\uff0c\u8c22\u8c22\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4879655\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : delectate <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6839\u636e\u7ecf\u9a8c\uff0c\u5c3d\u91cf\u4e0d\u8981\u7528 ocr \u3001\u7b80\u8ff0\u64cd\u4f5c\u8fd9\u6837\u7684\u4e0d\u9760\u8c31\u7684\u65b9\u5f0f\u3002\u7528\u4e5f\u8981\u7528 selenium \u8fd9\u79cd\uff0c\u6216\u8005\u60f3\u529e\u6cd5\u6293\u5305\uff0c\u627e\u5230 xlsx \u7684\u4e0b\u8f7d\u5730\u5740\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4879656\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : jmyz0455 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @delectate \u4e0d\u9760\u8c31\u561b\uff0c\u6211\u4ee5\u4e3a\u5f88\u591a\u6e38\u620f\u90fd\u662f\u7528\u771f\u673a\u5f00\u7a0b\u5e8f\u548c\u811a\u672c\u5f00\u5237\u7684\u3002<br \/>\u8fd9\u4e2a\u7edf\u8ba1\u8f6f\u4ef6\u662f .exe \u7a0b\u5e8f\uff0cselenium \u884c\u4e0d\u901a\u3002\u6293\u5305\u6293\u5230\u4e86\uff0c\u4f46\u662f xlsx \u4e0b\u8f7d\u5730\u5740\u662f\u4e2a api\uff0c\u8981\u5e26 token \u624d\u4e0d\u4f1a 403 \u62d2\u7edd\u8bf7\u6c42\u3002<br \/>\u800c\u83b7\u5f97 token \u8981\u5148\u8dd1\u767b\u9646\u63a5\u53e3\uff0c\u767b\u9646\u8fd9\u4e00\u4e0b\u5c31\u628a\u6211\u670b\u53cb\u7684\u8d26\u53f7\u8e22\u4e86\uff0c\u4ed6\u767b\u9646\u8981\u7ba1\u7406\u5458\u6388\u6743\uff0c\u4e5f\u633a\u9ebb\u70e6\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4879657\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ml1344677 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5927\u6f20\u63d2\u4ef6\u4e86\u89e3\u4e00\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4879658\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : exip <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u83b7\u53d6 token \u91cd\u653e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4879659\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : jmyz0455 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ml1344677 \u770b\u4e0a\u53bb\u662f\u4e2a\u811a\u672c\u7cbe\u7075\u7684\u63d2\u4ef6\uff1f\u963f\u8fd9\u8fde python \u90fd\u4e0d\u7528\u4e86\uff0c\u6211\u8fd8\u4ee5\u4e3a\u7ec3\u7ec3\u624b\u6765\u7740\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4879660\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : jmyz0455 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @exip \u8bf7\u95ee\u91cd\u653e\u662f\u4ec0\u4e48\u610f\u601d\uff1f\u6211\u4e00\u62ff token \uff08\u767b\u9646\uff09\u8fd9\u4e00\u6b65\u5c31\u4f1a\u628a\u6211\u670b\u53cb\u6324\u4e0b\u7ebf\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Python \u505a\u6a21\u62df\u9f20\u6807\u64cd\u4f5c\uff0c\u8fd9\u4e2a&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\/269059"}],"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=269059"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/269059\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269059"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}