Compare commits

2 Commits

Author SHA1 Message Date
4092217a8f test 2024-01-09 14:21:07 +08:00
bbacdd8778 Merge pull request #1 from Hiiragi10073/fix-0.0.2
fix: 解决文件路径读取错误的问题;解决读取token时自带换行符的问题
2022-12-14 16:46:26 +08:00
2 changed files with 17 additions and 0 deletions

2
app.py
View File

@ -6,6 +6,7 @@ import bgmTVApi
import mail
from generateMailContent import generate
from loadYaml import loadYaml
import toRss
# 获取 qBittorrent 传递的参数
name = sys.argv[1]
@ -104,3 +105,4 @@ else:
mailContent = generate('./template/email3.html', data)
mail.send(mailSubject, mailContent, isBangumi)
toRss.send(mailSubject, mailContent, mediaUrl)

15
toRss.py Normal file
View File

@ -0,0 +1,15 @@
import os
import requests
from requests import exceptions
# 消除ssl告警
requests.packages.urllib3.disable_warnings()
def send(subject, content, url):
data = {
"title": subject,
"description": content,
"url": url
}
requests.post(url=f'https://task.liliyamol.cn:8081/users/1/web_requests/64/5fe7c37a-59ab-4d88-a217-43a8da734327', verify=False, data=data)