This commit is contained in:
jxxghp
2023-06-11 10:35:47 +08:00
parent b7dc404e06
commit b889dd4939
2 changed files with 6 additions and 3 deletions

View File

@ -14,7 +14,7 @@ from app.core.metainfo import MetaInfo
from app.log import logger
from app.utils.http import RequestUtils
from app.utils.singleton import Singleton
from app.utils.string import StringUtils
apihelper.proxy = settings.PROXY
@ -146,7 +146,8 @@ class Telegram(metaclass=Singleton):
link = torrent.page_url
title = f"{meta.get_season_episode_string()} " \
f"{meta.get_resource_type_string()} " \
f"{meta.get_resource_team_string()}"
f"{meta.get_resource_team_string()} " \
f"{StringUtils.str_filesize(torrent.size)}"
title = re.sub(r"\s+", " ", title).strip()
free = torrent.get_volume_factor_string()
seeder = f"{torrent.seeders}"

View File

@ -10,6 +10,7 @@ from app.core.metainfo import MetaInfo
from app.log import logger
from app.utils.http import RequestUtils
from app.utils.singleton import Singleton
from app.utils.string import StringUtils
lock = threading.Lock()
@ -215,7 +216,8 @@ class WeChat(metaclass=Singleton):
torrent_title = f"{index}.【{torrent.site_name}" \
f"{meta.get_season_episode_string()} " \
f"{meta.get_resource_type_string()} " \
f"{meta.get_resource_team_string()}" \
f"{meta.get_resource_team_string()} " \
f"{StringUtils.str_filesize(torrent.size)} " \
f"{torrent.get_volume_factor_string()} " \
f"{torrent.seeders}"
title = re.sub(r"\s+", " ", title).strip()