提交 aa824632 编写于 作者: W wizardforcel

2022-03-16 15:49:28

上级 b9a35693
......@@ -94,7 +94,7 @@ def tr_download_page_safe(url, art, imgs):
def tr_download_page(url, art, imgs):
hash = hashlib.md5(url.encode('utf-8')).hexdigest()
cache = load_article(hash)
if cache is not None:
if cache is not None and config['cache']:
print(f'{url} 已存在于本地缓存中')
art.update(cache)
art['content'] = process_img(
......
......@@ -34,7 +34,7 @@ def tr_download_img_safe(url, imgs, picname):
def tr_download_img(url, imgs, picname):
hash = hashlib.md5(url.encode('utf-8')).hexdigest()
cache = load_img(hash, config['optiMode'])
if cache is not None:
if cache is not None and config['cache']:
print(f'{url} 已存在于本地缓存中')
imgs[picname] = cache
return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册