1
0
mirror of https://github.com/apachecn/epub-crawler.git synced 2025-06-07 10:01:11 +00:00

2022-03-15 23:44:44

This commit is contained in:
wizardforcel 2022-03-15 23:44:44 +08:00
parent f71ff1337c
commit 5f30e1c910
2 changed files with 2 additions and 0 deletions

View File

@ -107,6 +107,7 @@ def tr_download_page(url, art, imgs):
art.update(get_article(html, url))
save_article(hash, art)
else:
print(f'{url} 已存在于本地缓存中')
art.update(cache)
art['content'] = process_img(
art['content'], imgs,

View File

@ -47,6 +47,7 @@ def tr_download_img(url, imgs, picname):
data = opti_img(data, config['optiMode'], config['colors']) or b''
save_img(hash, config['optiMode'], data)
else:
print(f'{url} 已存在于本地缓存中')
data = cache
imgs[picname] = data
time.sleep(config['wait'])