2 Star 1 Fork 1

Charles/github_ClassmateLin_jd_scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
jx_pasture_collect.py 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
ClassmateLin 提交于 2021-09-02 09:53 +08:00 . 恢复
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
# @Time : 2021/8/24 3:56 下午
# @File : jx_pasture_collect.py
# @Project : jd_scripts
# @Cron : 40 */1 * * *
# @Desc : 京喜APP->京喜牧场->定时收金币/割草/投喂小鸡
import aiohttp
from utils.console import println
from jx_pasture import JxPasture
class JxPastureCollect(JxPasture):
async def run(self):
"""
:return:
"""
await self.get_encrypt()
async with aiohttp.ClientSession(cookies=self.cookies, headers=self.headers) as session:
if not await self.init(session):
println('{}, 无法初始化, 退出程序!'.format(self.account))
return
await self.get_gold_from_bull(session) # 收牛牛金币
await self.buy_food(session) # 买白菜
await self.feed(session) # 喂白菜
await self.mowing(session, max_times=10) # 割草
await self.sweep_chicken_legs(session, max_times=10) # 扫鸡腿
if __name__ == '__main__':
from utils.process import process_start
process_start(JxPastureCollect, '京喜牧场', 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

搜索帮助