dailycheckin/motto/motto.py
shitao adee1a78bc 🎨 调整多账号运行方式;
🐛 修复腾讯视频签到失败的 BUG;
🔨 添加腾讯视频已完成任务的自动领取;
🔨 修改企业微信应用推送格式。
2021-03-05 01:04:02 +08:00

28 lines
584 B
Python

# -*- coding: utf-8 -*-
import json
import os
import requests
class Motto:
@staticmethod
def main():
"""
从词霸中获取每日一句,带英文。
:return:
"""
resp = requests.get(url="http://open.iciba.com/dsapi")
if resp.status_code == 200:
content_json = resp.json()
content = content_json.get("content")
note = content_json.get("note")
msg = [f"{content}\n{note}\n"]
else:
msg = []
return msg
if __name__ == "__main__":
Motto().main()