855 协议版本-调整完毕内容
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
@@ -6,6 +5,8 @@ import traceback
|
||||
import requests
|
||||
from typing import Dict, Any, List, Optional, Tuple
|
||||
|
||||
from loguru import logger
|
||||
|
||||
from message_util import MessageUtil
|
||||
from plugin_common.message_plugin_interface import MessagePluginInterface
|
||||
from plugin_common.plugin_interface import PluginStatus
|
||||
@@ -47,6 +48,7 @@ class DouyinParserPlugin(MessagePluginInterface):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.LOG = logger
|
||||
self.url_pattern = re.compile(r'https?://v\.douyin\.com/\w+/?')
|
||||
# 修改为使用插件目录下的down_load_dir文件夹
|
||||
self.download_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "down_load_dir")
|
||||
@@ -56,7 +58,6 @@ class DouyinParserPlugin(MessagePluginInterface):
|
||||
|
||||
def initialize(self, context: Dict[str, Any]) -> bool:
|
||||
"""初始化插件"""
|
||||
self.LOG = logging.getLogger(f"Plugin.{self.name}")
|
||||
self.LOG.info(f"正在初始化 {self.name} 插件...")
|
||||
|
||||
# 保存上下文对象
|
||||
|
||||
Reference in New Issue
Block a user