commit
0b99641150
4
push.py
4
push.py
@ -83,8 +83,10 @@ def smtp(send_title, push_message):
|
|||||||
import smtplib
|
import smtplib
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
|
|
||||||
|
IMAGE_API = "http://api.iw233.cn/api.php?sort=random&type=json"
|
||||||
|
|
||||||
try:
|
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:
|
except:
|
||||||
image_url = "unable to get the image"
|
image_url = "unable to get the image"
|
||||||
log.warning("获取随机背景图失败,请检查图片api")
|
log.warning("获取随机背景图失败,请检查图片api")
|
||||||
|
Loading…
Reference in New Issue
Block a user