|
| 1 | +# @Time : 2020/3/31 16:49 |
| 2 | +# @Author : Libuda |
| 3 | +# @FileName: main.py |
| 4 | +# @Software: PyCharm |
| 5 | + |
| 6 | +from selenium import webdriver |
| 7 | +import time |
| 8 | +from configparser import ConfigParser |
| 9 | + |
| 10 | +config_parser = ConfigParser() |
| 11 | +config_parser.read('config.cfg', encoding="utf-8-sig") |
| 12 | +config = config_parser['default'] |
| 13 | + |
| 14 | +name = config['姓名'] |
| 15 | +idcard_z = config['身份证正面图'] |
| 16 | +idcard_f = config['身份证反面图'] |
| 17 | +signuture = config['手写签名'] |
| 18 | +idcard_num = config['身份证'] |
| 19 | +address = config['联系地址'] |
| 20 | +code = config['邮政编码'] |
| 21 | +phone = config['联系电话'] |
| 22 | +email = config["邮箱"] |
| 23 | +zhiye = config['职业'] |
| 24 | +xueli = config['学历'] |
| 25 | +yingyebu = config['开户营业部'] |
| 26 | +yinghang = config['银行'] |
| 27 | +yinghangka = config['银行卡账号'] |
| 28 | +wangdian = config['银行网点'] |
| 29 | +question_answer = config['question_answer'] |
| 30 | + |
| 31 | +iedriver = webdriver.Ie("D:\PycharmProjects\leetcode-python-\zhqh信息填写脚本\IEDriverServer.exe") |
| 32 | + |
| 33 | + |
| 34 | +def logger(msg): |
| 35 | + """ |
| 36 | + 日志信息 |
| 37 | + """ |
| 38 | + now = time.ctime() |
| 39 | + print("[%s] %s" % (now, msg)) |
| 40 | + |
| 41 | + |
| 42 | +def main(): |
| 43 | + iedriver.get("https://zhqh.cfmmc.com/") |
| 44 | + |
| 45 | + login_confirm = input("请输入您的手机号,图片验证码及短信验证码,回车键进行下一步:") |
| 46 | + |
| 47 | + if login_confirm: |
| 48 | + pass |
| 49 | + |
| 50 | + logger("上传您的身份证及手写签名中,请稍后") |
| 51 | + # 身份证正面 |
| 52 | + iedriver.find_element_by_class_name("").send_keys(idcard_z) |
| 53 | + # 身份证背面 |
| 54 | + iedriver.find_element_by_class_name("").send_keys(idcard_f) |
| 55 | + # 手写签名 |
| 56 | + iedriver.find_element_by_class_name("").send_keys(signuture) |
| 57 | + # 确认接收协议 |
| 58 | + iedriver.find_element_by_class_name("").click() |
| 59 | + |
| 60 | + next_confirm = input("回车进行下一步") |
| 61 | + |
| 62 | + if next_confirm: |
| 63 | + pass |
| 64 | + |
| 65 | + # 点击下一步 |
| 66 | + iedriver.find_element_by_class_name("").click() |
| 67 | + |
| 68 | + # 资料报审页面 |
| 69 | + # 客户姓名 |
| 70 | + iedriver.find_element_by_class_name("").send_keys(name) |
| 71 | + # 身份证号 |
| 72 | + iedriver.find_element_by_class_name("").send_keys(idcard_num) |
| 73 | + # 联系地址 |
| 74 | + iedriver.find_element_by_class_name("").send_keys(address) |
| 75 | + # 邮政编码 |
| 76 | + iedriver.find_element_by_class_name("").send_keys(code) |
| 77 | + # 联系电话 |
| 78 | + iedriver.find_element_by_class_name("").send_keys(phone) |
| 79 | + # 邮箱 |
| 80 | + iedriver.find_element_by_class_name("").send_keys(email) |
| 81 | + # 职业 |
| 82 | + iedriver.find_element_by_class_name("").send_keys(zhiye) |
| 83 | + # 学历 |
| 84 | + iedriver.find_element_by_class_name("").send_keys(xueli) |
| 85 | + # 开户营业部 |
| 86 | + iedriver.find_element_by_class_name("").send_keys(yingyebu) |
| 87 | + |
| 88 | + next_confirm = input("请确认资料报审信息,回车键继续") |
| 89 | + |
| 90 | + if next_confirm: |
| 91 | + pass |
| 92 | + |
| 93 | + # 下一步 |
| 94 | + iedriver.find_element_by_class_name("").click() |
| 95 | + |
| 96 | + # 指定结算银行 |
| 97 | + |
| 98 | + # 银行卡账号 |
| 99 | + iedriver.find_element_by_class_name("").click(idcard_num) |
| 100 | + |
| 101 | + # 银行网点 |
| 102 | + |
| 103 | + # 上传银行卡照片 |
| 104 | + iedriver.find_element_by_class_name("").send_keys() |
| 105 | + |
| 106 | + next_confirm = input("上传银行卡照片,回车继续") |
| 107 | + if next_confirm: |
| 108 | + pass |
| 109 | + |
| 110 | + # 选择题填写 |
| 111 | + |
| 112 | + next_confirm = input("确认选择题选择完毕,回车继续") |
| 113 | + if next_confirm: |
| 114 | + pass |
| 115 | + |
| 116 | + # 下一步 |
| 117 | + |
| 118 | + |
| 119 | +if __name__ == '__main__': |
| 120 | + main() |
0 commit comments