mirror of
https://github.com/Sitoi/dailycheckin.git
synced 2024-11-17 21:58:03 +08:00
adee1a78bc
🐛 修复腾讯视频签到失败的 BUG; 🔨 添加腾讯视频已完成任务的自动领取; 🔨 修改企业微信应用推送格式。
28 lines
584 B
Python
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()
|