This commit is contained in:
caiwx86 2022-12-20 17:40:15 +08:00
parent 57db571e5d
commit 7dd1a86335

View File

@ -8,7 +8,6 @@ from requests.adapters import HTTPAdapter
from utils.Ntfy import ntfy
import re
from utils.comic.PathStr import pathStr
import json
class htmlUtils:
headers = {'User-Agent': UserAgent().random}
@ -17,7 +16,7 @@ class htmlUtils:
@classmethod
def getPathSaveHtml(cls,url,type=None):
rstr = r"[\/\\\:\*\?\"\<\>\|\.]" #  '/ \ : * ? " < > |'
file_url = re.sub(rstr, "_", url)
file_url = re.sub(rstr, "", url)
file_path = os.path.join(pathStr.base_html_data,file_url)
if type == "new":
return file_path