Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
4092217a8f | |||
bbacdd8778 |
2
app.py
2
app.py
@ -6,6 +6,7 @@ import bgmTVApi
|
|||||||
import mail
|
import mail
|
||||||
from generateMailContent import generate
|
from generateMailContent import generate
|
||||||
from loadYaml import loadYaml
|
from loadYaml import loadYaml
|
||||||
|
import toRss
|
||||||
|
|
||||||
# 获取 qBittorrent 传递的参数
|
# 获取 qBittorrent 传递的参数
|
||||||
name = sys.argv[1]
|
name = sys.argv[1]
|
||||||
@ -104,3 +105,4 @@ else:
|
|||||||
mailContent = generate('./template/email3.html', data)
|
mailContent = generate('./template/email3.html', data)
|
||||||
|
|
||||||
mail.send(mailSubject, mailContent, isBangumi)
|
mail.send(mailSubject, mailContent, isBangumi)
|
||||||
|
toRss.send(mailSubject, mailContent, mediaUrl)
|
15
toRss.py
Normal file
15
toRss.py
Normal 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)
|
Reference in New Issue
Block a user