2 Star 1 Fork 1

Charles/github_ClassmateLin_jd_scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
jx_factory_collect.py 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
ClassmateLin 提交于 2021-09-02 09:53 +08:00 . 恢复
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
# @Time : 2021/8/8 下午6:39
# @Project : jd_scripts
# @File : jx_factory_collect.py
# @Cron : 45 */1 * * *
# @Desc : 京喜App->我的->京喜工厂, 定时收电量
import aiohttp
from jx_factory import JxFactory
from utils.console import println
from utils.process import process_start
from utils.jx_init import jx_init
@jx_init
class JxFactoryCollect(JxFactory):
"""
京喜工厂收电量
"""
async def run(self):
await self.get_encrypt()
async with aiohttp.ClientSession(headers=self.headers, cookies=self.cookies) as session:
success = await self.init(session)
if not success:
println('{}, 初始化失败!'.format(self.account))
self.message = None
return
await self.collect_user_electricity(session)
await self.collect_friend_electricity(session)
if __name__ == '__main__':
process_start(JxFactoryCollect, '京喜工厂收电量', help=False)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ritaswc/ClassmateLin_jd_scripts.git
git@gitee.com:ritaswc/ClassmateLin_jd_scripts.git
ritaswc
ClassmateLin_jd_scripts
github_ClassmateLin_jd_scripts
develop

搜索帮助