新增监听剪贴板下载作品功能

This commit is contained in:
yongquan
2024-01-27 16:29:52 +08:00
parent f6c232d14c
commit 2c8efd0c27
20 changed files with 169 additions and 37 deletions

View File

@@ -11,7 +11,6 @@ from aiohttp import ClientTimeout
from source.translator import Chinese
from source.translator import English
from .static import COOKIE
from .static import HEADERS
from .static import USERAGENT
@@ -19,7 +18,7 @@ __all__ = ["Manager"]
class Manager:
NAME = compile(r"[^\u4e00-\u9fa5a-zA-Z0-9]")
NAME = compile(r"[^\u4e00-\u9fffa-zA-Z0-9!?,。;:“”()《》]")
def __init__(
self,
@@ -43,7 +42,7 @@ class Manager:
self.folder = self.__check_folder(folder)
self.blank_headers = HEADERS | {
"User-Agent": user_agent or USERAGENT, }
self.headers = self.blank_headers | {"Cookie": cookie or COOKIE}
self.headers = self.blank_headers | {"Cookie": cookie}
self.retry = retry
self.chunk = chunk
self.record_data = record_data