python网页交互引擎_使用Python与网页交互

In my current job we have a web based Business intelligence tool where every morning i have to create data extracts from the system and paste them into a PowerPoint presentation. I wish to automate this as its repetitive and time consuming (we have also had several redundancies and i have been allocated the analysts work so i also want to try get home before 10pm :)). The bottle neck for generating these reports is running them on the website and then exporting the results to excel as this manual process can take anything from 10 minutes to an hour of waiting.

I would like to create a script that will open up the web page, make the selections in listboxes containing such information as location product etc as well as a date chooser, press an apply button once the report has generated then export it. This would happen during the period when no one is in the office so the files would be ready when i come in to analysis as opposed to just generating the reports

A second smaller question, Is there a quick way to identify the listboxes using firefox or IE explorer so that they can be referenced in the code?

Is this possible in Python?

Our IT department are also quite strict so for example i can not install new software but can install libraries for Python

Could anyone point me in the direction of sample code particularly referencing listboxes or date objects?

Thank you very much for your time

解决方案

All this can be done automated using selenium[1] . If you know the class name/id etc for the listboxes, selenium allows you to send click events to the browser for checking/unchecking listboxes. Read up [2] on filling HTML forms using selenium. You can find the relevant code in the documentation links below.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值