从 Helsingin Energia 网站上抓取用电信息的小型图书馆
项目描述
这个小脚本从 Helsingin Energia (Helen) 网站获取每小时用电量。这是非官方的实施,如果 Helen 更改其网站或实施任何其他验证,可能随时中断。
安装:
pip install helen_electricity_usage
用法:
import helen_electricity_usage
helen = helen_electricity_usage.Helen(username, password, metering_point_number, customer_number)
helen.login()
print helen.get_date("20141225")
要获取用户名和密码,请使用Web 界面注册(需要 Flash 和纸质发票)。注册并登录后,右上角会显示计量点编号。
示例输出(python 字典):
[{'month': 10,
'hour': 0,
'year': 2020,
'waterFlowPrice': 0.0,
'temperature': 11.8,
'milestones': [],
'value': 0.92999,
'day': 1,
'teleEuro': 0.0,
'status': 30,
'telePrediction': 0.0},
{'month': 10,
'hour': 1,
'year': 2020,
'waterFlowPrice': 0.0,
'temperature': 11.2,
'milestones': [],
'value': 0.66,
'day': 1,
'teleEuro': 0.0,
'status': 30,
'telePrediction': 0.0},
...
]
无法检查特定日期的数据是否可用。如果数据不可用,则提供所有字段,但值为 0.0。没有办法区分丢失的数据和没有电力消耗的小时数。通常数据在第二天就可以使用,但这不能保证。
项目详情
关
helen_electricity_usage -0.5.0-py2.py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 184ef6acc3ca1e3d94ee7ee015517a70720b6fdcb4e3ab79dbc21c67bea8e379 |
|
| MD5 | dddc0c51cb76dd04f6bcf729943f7195 |
|
| 布莱克2-256 | 27bdf3cee3893f84c0b0dac1935df2e765bc4566c1397f927254d3f2b4e82458 |