mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-08 12:53:00 +08:00
update mcbbs
This commit is contained in:
parent
43490639c1
commit
b98d0d6f2f
@ -7,9 +7,16 @@ from bs4 import BeautifulSoup, NavigableString, Tag
|
|||||||
|
|
||||||
from ..post import Post
|
from ..post import Post
|
||||||
from ..types import Category, RawPost, Target
|
from ..types import Category, RawPost, Target
|
||||||
|
from ..utils import SchedulerConfig
|
||||||
from .platform import CategoryNotSupport, NewMessage
|
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:
|
def _format_text(rawtext: str, mode: int) -> str:
|
||||||
"""处理BeautifulSoup生成的string中奇怪的回车+连续空格
|
"""处理BeautifulSoup生成的string中奇怪的回车+连续空格
|
||||||
mode 0:处理标题
|
mode 0:处理标题
|
||||||
@ -38,8 +45,7 @@ class McbbsNews(NewMessage):
|
|||||||
name = "MCBBS幻翼块讯"
|
name = "MCBBS幻翼块讯"
|
||||||
enabled = True
|
enabled = True
|
||||||
is_common = False
|
is_common = False
|
||||||
schedule_type = "interval"
|
scheduler_class = "msbbs"
|
||||||
schedule_kw = {"hours": 1}
|
|
||||||
has_target = False
|
has_target = False
|
||||||
|
|
||||||
async def get_target_name(self, _: Target) -> str:
|
async def get_target_name(self, _: Target) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user