1. 修复小bug

2. Filelist 消息标题通知
This commit is contained in:
ngfchl
2023-01-05 01:55:53 +08:00
parent a5f0702f52
commit 54ccd196c6
3 changed files with 7 additions and 7 deletions

View File

@@ -7059,7 +7059,7 @@
"pk": 97,
"fields": {
"created_at": "2022-12-26T13:31:54.151",
"updated_at": "2023-01-04T21:44:06.606",
"updated_at": "2023-01-05T01:54:32.618",
"url": "https://filelist.io/",
"name": "Filelist",
"nickname": "filelist",
@@ -7133,7 +7133,7 @@
"record_count_rule": ".//td[3]/text()",
"seed_vol_rule": "//div[contains(text(),\"Seeding\")]/b[2]/text()",
"mailbox_rule": "//a[@href=\"/messages.php\"]/span[1]/text()[1]",
"message_title": "//img[@alt=\"Unread\"]/parent::td/following-sibling::td/a[1]//text()",
"message_title": "//img[@alt=\"Unread\"]/parent::div/following-sibling::a[1]/div/b/text()",
"notice_rule": "//a[@href=\"index.php\"]/font[contains(text(),\"条\")]/text()[1]",
"full_site_free": "//td/b/a/font[contains(text(),\"全站\") and contains(text(),\"Free\")]/text()",
"hash_rule": "//td/b[contains(text(),\"Hash\")]/following::text()[1]"

View File

@@ -1484,8 +1484,8 @@ class PtSpider:
validator = ''.join(self.parse(res, '//input[@name="validator"]/@value'))
login_url = ''.join(self.parse(res, '//form/@action'))
login_method = ''.join(self.parse(res, '//form/@method'))
with open('db/ptools.yaml', 'r') as f:
data = yaml.load(f, Loader=yaml.FullLoader)
with open('db/ptools.toml', 'r') as f:
data = toml.load(f)
filelist = data.get('filelist')
username = filelist.get('username')
password = filelist.get('password')
@@ -2178,7 +2178,7 @@ class PtSpider:
logger.info(mail)
title = f'{site.name}{mail_count + notice_count}条新短消息,请注意及时查收!'
# 测试发送网站消息原内容
message = f'{notice_str}\n> {mail}'
message = f'{notice_str} \n> {mail}'
self.send_text(title=title, message=message)
else:
my_site.mail = 0

View File

@@ -6808,7 +6808,7 @@
{
"id": 97,
"created_at": "2022-12-26 13:31:54.151043",
"updated_at": "2023-01-04 21:44:06.606106",
"updated_at": "2023-01-05 01:54:32.618963",
"name": "Filelist",
"url": "https://filelist.io/",
"logo": "https://filelist.io/favicon.ico",
@@ -6884,7 +6884,7 @@
"page_hr": "myhr.php?hrtype=1&userid={}",
"search_params": "{\"免费\":\"spstate=2\",\"2X\":\"spstate=3\",\"2X免费\":\"spstate=4\",\"50%\":\"spstate=5\",\"2X 50%\":\"spstate=6\",}",
"full_site_free": "//td/b/a/font[contains(text(),\"全站\") and contains(text(),\"Free\")]/text()",
"message_title": "//img[@alt=\"Unread\"]/parent::td/following-sibling::td/a[1]//text()",
"message_title": "//img[@alt=\"Unread\"]/parent::div/following-sibling::a[1]/div/b/text()",
"page_message": "messages.php"
},
{