minor: 更新图片api

This commit is contained in:
hinak0 2022-09-15 07:02:54 +08:00
parent 813311e327
commit ad5bd273c8

View File

@ -83,8 +83,10 @@ def smtp(send_title, push_message):
import smtplib
from email.mime.text import MIMEText
IMAGE_API = "http://api.iw233.cn/api.php?sort=random&type=json"
try:
image_url = http.get("https://iw233.cn/api.php?sort=random&type=json").json()["pic"][0]
image_url = http.get(IMAGE_API).json()["pic"][0]
except:
image_url = "unable to get the image"
log.warning("获取随机背景图失败请检查图片api")