update mcbbs

This commit is contained in:
felinae98 2022-06-06 00:56:25 +08:00
parent 43490639c1
commit b98d0d6f2f
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610

View File

@ -7,9 +7,16 @@ from bs4 import BeautifulSoup, NavigableString, Tag
from ..post import Post
from ..types import Category, RawPost, Target
from ..utils import SchedulerConfig
from .platform import CategoryNotSupport, NewMessage
class McbbsSchedConf(SchedulerConfig, name="mcbbs"):
schedule_type = "interval"
schedule_setting = {"hours": 1}
def _format_text(rawtext: str, mode: int) -> str:
"""处理BeautifulSoup生成的string中奇怪的回车+连续空格
mode 0:处理标题
@ -38,8 +45,7 @@ class McbbsNews(NewMessage):
name = "MCBBS幻翼块讯"
enabled = True
is_common = False
schedule_type = "interval"
schedule_kw = {"hours": 1}
scheduler_class = "msbbs"
has_target = False
async def get_target_name(self, _: Target) -> str: