|
@@ -17,10 +17,9 @@ from common.mq import MQ
|
|
|
sys.path.append(os.getcwd())
|
|
|
from common.common import Common
|
|
|
from common.scheduling_db import MysqlHelper
|
|
|
-from common.public import get_config_from_mysql, download_rule, download_rule_v2
|
|
|
+from common.public import get_config_from_mysql, download_rule_v2, clean_title
|
|
|
|
|
|
|
|
|
-# 定义一个 AES 加密解密的类
|
|
|
class AESCipher:
|
|
|
def __init__(self, key):
|
|
|
self.key = key.encode('utf-8') # 需要一个bytes类型的key
|
|
@@ -43,30 +42,6 @@ class AESCipher:
|
|
|
return None
|
|
|
|
|
|
|
|
|
-def clean_title(strings):
|
|
|
- return (
|
|
|
- strings.strip()
|
|
|
- .replace("\n", "")
|
|
|
- .replace("/", "")
|
|
|
- .replace("\r", "")
|
|
|
- .replace("#", "")
|
|
|
- .replace(".", "。")
|
|
|
- .replace("\\", "")
|
|
|
- .replace("&NBSP", "")
|
|
|
- .replace(":", "")
|
|
|
- .replace("*", "")
|
|
|
- .replace("?", "")
|
|
|
- .replace("?", "")
|
|
|
- .replace('"', "")
|
|
|
- .replace("<", "")
|
|
|
- .replace(">", "")
|
|
|
- .replace("|", "")
|
|
|
- .replace(" ", "")
|
|
|
- .replace('"', "")
|
|
|
- .replace("'", "")
|
|
|
- )
|
|
|
-
|
|
|
-
|
|
|
class HTZFScheduling:
|
|
|
def __init__(self, log_type, crawler, rule_dict, env, our_uid):
|
|
|
self.platform = "haitunzhufu"
|