安全教育平台助手

Autor

An application that helps you with your Hangzhou Safety Education Tasks.

Gitee
GitHub

How To Use

Download Chrome WebDriver

As using Google Chrome, I choose Chrome WebDriver.You can change other webdriver like FireFox and so on.Where you should change is File “Autor\autor.py”, Line 15.

browser = webdriver.Chrome(options=chrome_options)

Click Mirror Link then select and download the driver matching your browser version.

webdriver

Unzip the .zip file and copy the .exe file to the same path of your script.

Install Autor

Type the command below to install Autor.

pip install Autor

Test Autor

Here is a simple test script.

from Autor.autor import login

account = 'fengtangzheng'
password = 'jDT3TBALkZ8rJ78'
login(account, password)

Here is result.

[*] fengtangzheng logging... 
[+] Login succeeded.

Process finished with exit code 0

Write Your Script

By running the script below, Autor will help you solve your Hangzhou safety education tasks.

from Autor.autor import help_me

account = 'fengtangzheng'
password = 'jDT3TBALkZ8rJ78'
help_me(account, password)

Function

There are some interesting functions in file author.py.

login(_account, pwd)

These function is to login.


Parameter Description:

  • _account(String): Your account.
  • pwd(String): Your password.

Return Value:

  • True(Boolean): Login succeeded.
  • False(Boolean): Fail to login

get_tasks()

These function is to get your unsolved tasks in index.Before you use it, you should login first.


Return Value:

  • _task(List):Unsolved Tasks List

    e.g.

    [btn, flag, False]
  1. btn(WebElement): unsovled task
  2. flag(Boolean): Task Type.True for Question Type Task while False for Video Type Task.
  3. False(Boolean): To be used.

safe_study_solution(_task)

These function is to solve question type tasks.


Parameter Description:

  • _task(WebElement): Question type task.

video_solution(_task)

These function is to solve question type tasks.However, it is imperfect.I will soon fix it.


Parameter Description:

  • _task(WebElement): Video type task.

help_me(_account, _pwd, view=False)

The function is to solve your tasks automatically.


Parameter Description:

  • _account(String): Your account.
  • _pwd(String): Your password.
  • view(Boolean): True for visible process while False for invisible process.

End

这个项目完成的日子是1月21日,是除夕的日子,也是我的奶奶过世的日子。我现在不知道怀着怎样的心情在对这个项目收尾。听着屋外的鞭炮声,我开始回忆小的时候。从我读幼儿园开始,奶奶就陪着我,每次从幼儿园出来,都能看到奶奶都站在门口等我,带着她充满慈爱的笑容。在回家的路上,我总是有很多奇怪的想法说给她听,她不明白我的想法,却始终怀揣着笑容鼓励我去做我想做的事情。后来我长大了,奶奶回老家生活了,虽然很想念她,不过每年也是可以回去看看她,给她看我的奖状,给她讲我的收获,我也可以再看看她的笑容。再后来,我中考失利,进入了高中,因为赛事和疫情,我没有再回过老家,每次过年,也都是以视频的形式联系她。就在昨天,江西的正年,老家来电,奶奶病倒了,我的心悬起,对着满满一桌饭菜,却一点提不起食欲。我很愧疚,我原本想着好好读书,等高考结束,带着我的录取通知书,风风光光地回家。可惜一切,都晚了。

Author

Lorenzo Feng(正崽不emo)

paradise_c@qq.com

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

正崽不emo

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值