Ai
2 Star 1 Fork 1

Charles/github_ClassmateLin_jd_scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
dj_bean_manor_water.py 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
ClassmateLin 提交于 2021-09-02 09:53 +08:00 . 恢复
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
# @Time : 2021/7/28 5:58 下午
# @File : dj_bean_manor_water.py
# @Project : jd_scripts
# @Cron : */40 * * * *
# @Desc : 京东APP->京东到家->签到->鲜豆庄园, 定时领水滴/浇水
import asyncio
import aiohttp
from dj_bean_manor import DjBeanManor
from utils.process import process_start
from utils.console import println
class DjBeanManorWater(DjBeanManor):
"""
到家庄园收水滴/浇水
"""
async def run(self):
"""
程序入口
:return:
"""
async with aiohttp.ClientSession(cookies=self.cookies, headers=self.headers) as session:
dj_cookies = await self.login(session)
if not dj_cookies:
return
println('{}, 登录成功...'.format(self.account))
async with aiohttp.ClientSession(cookies=dj_cookies, headers=self.headers) as session:
activity_info = await self.get_activity_info(session)
if not activity_info:
println('{}, 获取活动ID失败, 退出程序!'.format(self.account))
return
await self.collect_watter(session)
await self.watering(session)
if __name__ == '__main__':
process_start(DjBeanManorWater, '鲜豆庄园领水/浇水')
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

搜索帮助