Used to record WKU's utility bills on a regular basis.

Overview

WKU水电费小助手

一个用于定期记录WKU水电费的脚本

Looking for English Readme?

背景

由于WKU校园内的水电账单系统时常存在扣费延迟的现象,而补扣的费用缺乏令人信服的证明。不少学生为费用摸不着头脑,但也没有申诉的依据。为了更好地掌握水电费使用情况,留下一手证据,我开源了这个自动化脚本。配合定时任务,它可以根据设定的时间间隔,自动查询当前的剩余的水电费情况,并形成记录。

安装以及部署

步骤#1: 捕获必要的验证信息

在获取水电费数据过程中,Cookie是通过身份认证的必要元素。为了抓取用于认证的数据包,我从微信公众号 ”温州肯恩大学校园卡 “下的“一卡通充值”服务入手。

提示:在本篇教程中,我使用Fiddler作为抓包工具。

步骤#1.1: 启用对HTTPS流量的捕获功能

由于我们获取Cookie所需的参数是通过HTTPS通信的,所以我们必须确保在开始之前,抓包软件已经启用了这个功能。

fiddler_https

步骤#1.2: 抓取微信公众号下H5网页的HTTPS请求

在抓包软件开始正常抓包后,我们打开微信公众号 ”温州肯恩大学校园卡 “并依次点击 "校园服务"、"一卡通充值"、"缴水费"。

步骤#1.3: 获得验证数据

最后一步! 我们从抓包软件中找到请求头为 "POST /app/login/getThirdUserAuthorize HTTP/1.1"的请求。在文本视图中复制ymTokenymUserId备用。

fiddler_data

提示:如果文本包含特殊符号,你需要将其转换为ASCII码。例如,"="需要转换为"%3D"。

步骤#2:安装Python脚本的依赖包

这个项目使用了Python3以及相关的依赖包,请确保你已经安装了它们。

pip install -r requirements.txt

步骤#3: 获取你寝室的areaCode

步骤#3.1: 填入验证数据

还记得我们在第一步获取的ymTokenymUserId嘛?将它们复制到我所提供的两个脚本中。

example_ym

步骤#3.2: 执行firstRun.py

在firstRun脚本中,你需要按照提示依次选择所属楼栋、所在楼层以及寝室号。

python firstRun.py

Step#3.3: 获取areaCode

复制脚本提供的areaCode,以便之后部署水电费记录机器人。

example_firstRun

提示:如果显示的水电费与微信公众号不一样,请通过问题板块告诉我(或者见面告诉我)

第4步:部署水电费记录机器人

步骤#4.1: 执行logRobot.py

python logRobot.py "your_area_code"

example_logRobot

提示:areaCode参数需要用引号括起来,否则记录机器人会报错。

执行后,在当前目录下会产生一个以areaCode为名称的txt文件。时间和对应的水电费会被记录在其中。

example_logFile

步骤#4.2: 将机器人部署在你想要部署的地方

该脚本目前部署在我的私人NAS上,并通过crontab定期进行记录。下面是我设置的crontab任务。

0 */4 * * * cd /data/fee && /usr/bin/python3 logRobot.py [areaCode]

拓展

这个脚本在轻量改写后可以在钉钉中实现缴费预警的功能。代码会在以后公布(可能会吧 老鸽子了orz)

example_dingReport

Unofficial implementation of One-Shot Free-View Neural Talking Head Synthesis

face-vid2vid Usage Dataset Preparation cd datasets wget https://yt-dl.org/downloads/latest/youtube-dl -O youtube-dl chmod a+rx youtube-dl python load_

worstcoder 68 Dec 30, 2022
Implementation for paper "STAR: A Structure-aware Lightweight Transformer for Real-time Image Enhancement" (ICCV 2021).

STAR-pytorch Implementation for paper "STAR: A Structure-aware Lightweight Transformer for Real-time Image Enhancement" (ICCV 2021). CVF (pdf) STAR-DC

43 Dec 21, 2022
Image Fusion Transformer

Image-Fusion-Transformer Platform Python 3.7 Pytorch =1.0 Training Dataset MS-COCO 2014 (T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ram

Vibashan VS 68 Dec 23, 2022
A best practice for tensorflow project template architecture.

A best practice for tensorflow project template architecture.

Mahmoud Gamal Salem 3.6k Dec 22, 2022
RITA is a family of autoregressive protein models, developed by LightOn in collaboration with the OATML group at Oxford and the Debora Marks Lab at Harvard.

RITA: a Study on Scaling Up Generative Protein Sequence Models RITA is a family of autoregressive protein models, developed by a collaboration of Ligh

LightOn 69 Dec 22, 2022
Official implementation of "An Image is Worth 16x16 Words, What is a Video Worth?" (2021 paper)

An Image is Worth 16x16 Words, What is a Video Worth? paper Official PyTorch Implementation Gilad Sharir, Asaf Noy, Lihi Zelnik-Manor DAMO Academy, Al

213 Nov 12, 2022
A higher performance pytorch implementation of DeepLab V3 Plus(DeepLab v3+)

A Higher Performance Pytorch Implementation of DeepLab V3 Plus Introduction This repo is an (re-)implementation of Encoder-Decoder with Atrous Separab

linhua 326 Nov 22, 2022
Ultra-lightweight human body posture key point CNN model. ModelSize:2.3MB HUAWEI P40 NCNN benchmark: 6ms/img,

Ultralight-SimplePose Support NCNN mobile terminal deployment Based on MXNET(=1.5.1) GLUON(=0.7.0) framework Top-down strategy: The input image is t

223 Dec 27, 2022
A library built upon PyTorch for building embeddings on discrete event sequences using self-supervision

pytorch-lifestream a library built upon PyTorch for building embeddings on discrete event sequences using self-supervision. It can process terabyte-si

Dmitri Babaev 103 Dec 17, 2022
[内测中]前向式Python环境快捷封装工具,快速将Python打包为EXE并添加CUDA、NoAVX等支持。

QPT - Quick packaging tool 快捷封装工具 GitHub主页 | Gitee主页 QPT是一款可以“模拟”开发环境的多功能封装工具,最短只需一行命令即可将普通的Python脚本打包成EXE可执行程序,并选择性添加CUDA和NoAVX的支持,尽可能兼容更多的用户环境。 感觉还可

QPT Family 545 Dec 28, 2022
moving object detection for satellite videos.

DSFNet: Dynamic and Static Fusion Network for Moving Object Detection in Satellite Videos Algorithm Introduction DSFNet: Dynamic and Static Fusion Net

xiaochao 39 Dec 16, 2022
An University Project of Quera Web Crawling.

WebCrawlerProject An University Project of Quera Web Crawling. خزشگر اینستاگرام در این پروژه شما باید با استفاده از کتابخانه های زیر یک خزشگر اینستاگر

Mahdi 3 Aug 12, 2022
PyTorch implementation of paper: AdaAttN: Revisit Attention Mechanism in Arbitrary Neural Style Transfer, ICCV 2021.

AdaAttN: Revisit Attention Mechanism in Arbitrary Neural Style Transfer [Paper] [PyTorch Implementation] [Paddle Implementation] Overview This reposit

148 Dec 30, 2022
Official Implementation of "LUNAR: Unifying Local Outlier Detection Methods via Graph Neural Networks"

LUNAR Official Implementation of "LUNAR: Unifying Local Outlier Detection Methods via Graph Neural Networks" Adam Goodge, Bryan Hooi, Ng See Kiong and

Adam Goodge 25 Dec 28, 2022
Efficient electromagnetic solver based on rigorous coupled-wave analysis for 3D and 2D multi-layered structures with in-plane periodicity

Efficient electromagnetic solver based on rigorous coupled-wave analysis for 3D and 2D multi-layered structures with in-plane periodicity, such as gratings, photonic-crystal slabs, metasurfaces, surf

Alex Song 17 Dec 19, 2022
Nested cross-validation is necessary to avoid biased model performance in embedded feature selection in high-dimensional data with tiny sample sizes

Pruner for nested cross-validation - Sphinx-Doc Nested cross-validation is necessary to avoid biased model performance in embedded feature selection i

1 Dec 15, 2021
Behavioral "black-box" testing for recommender systems

RecList RecList Free software: MIT license Documentation: https://reclist.readthedocs.io. Overview RecList is an open source library providing behavio

Jacopo Tagliabue 375 Dec 30, 2022
My published benchmark for a Kaggle Simulations Competition

Lux AI Working Title Bot Please refer to the Kaggle notebook for the comment section. The comment section contains my explanation on my code structure

Tong Hui Kang 29 Aug 22, 2022
LBBA-boosted WSOD

LBBA-boosted WSOD Summary Our code is based on ruotianluo/pytorch-faster-rcnn and WSCDN Sincerely thanks for your resources. Newer version of our code

Martin Dong 20 Sep 19, 2022
Notes, programming assignments and quizzes from all courses within the Coursera Deep Learning specialization offered by deeplearning.ai

Coursera-deep-learning-specialization - Notes, programming assignments and quizzes from all courses within the Coursera Deep Learning specialization offered by deeplearning.ai: (i) Neural Networks an

Aman Chadha 1.7k Jan 08, 2023