1 Star 1 Fork 0

赵彬 / automation_malaysia

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
alipay_手动付款需回车.py 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
赵彬 提交于 2019-02-20 10:14 . 新增数据库保存application
from alipay import RedisQueue, ALIPAY_KEY, time, timess, ali_pay, pay_over
st_input = True
if __name__ == "__main__":
while 1:
email = ""
try:
red = RedisQueue(ALIPAY_KEY)
except Exception:
time.sleep(5)
continue
try:
email = red.get_nowait()
if email:
url = red.hget(email)
if url:
st = timess()
print("\n", "-*" * 20, "\n", "AliPay Start", "\n", email, "\n", st, "\n", "-*" * 20)
a = ali_pay(email, url, False, st_input=st_input)
del a
red.db.delete("nouser_pay")
print("\n", "-*" * 20, "\n", "AliPay Over", "\n", email, "\n", timess() - st, "\n", "-*" * 20)
else:
if len(red.hgetall) != len(red.lgetall):
[red.hdel(i) for i in red.hgetall if i not in red.lgetall]
continue
if not red.db.get("nouser_pay"):
print("没有查到匹配的数据...", time.strftime("%Y-%m-%d %H:%M:%S"))
red.db.set("nouser_pay", "1", 60 * 30)
except Exception:
pass
finally:
if email:
pay_over(email)
red.hdel(email)
time.sleep(5)
Python
1
https://gitee.com/zhao12501/automation_malaysia.git
git@gitee.com:zhao12501/automation_malaysia.git
zhao12501
automation_malaysia
automation_malaysia
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891