mirror of
https://github.com/apachecn/epub-crawler.git
synced 2025-06-06 01:04:04 +00:00
2022-12-31 22:49:43
This commit is contained in:
parent
b10d74a67f
commit
41122f4f9d
@ -34,6 +34,7 @@ def get_toc_from_cfg():
|
||||
headers=config['headers'],
|
||||
timeout=config['timeout'],
|
||||
proxies=config['proxy'],
|
||||
verify=False,
|
||||
).content.decode(config['encoding'], 'ignore')
|
||||
return get_toc(html, config['url'])
|
||||
|
||||
@ -93,6 +94,7 @@ def tr_download_page(url, art, imgs):
|
||||
headers=config['headers'],
|
||||
timeout=config['timeout'],
|
||||
proxies=config['proxy'],
|
||||
verify=False,
|
||||
).content.decode(config['encoding'], 'ignore')
|
||||
print(f'{url} 下载成功')
|
||||
art.update(get_article(html, url))
|
||||
|
@ -46,6 +46,7 @@ def tr_download_img(url, imgs, picname):
|
||||
retry=config['retry'],
|
||||
timeout=config['timeout'],
|
||||
proxies=config['proxy'],
|
||||
verify=False,
|
||||
).content
|
||||
print(f'{url} 下载成功')
|
||||
data = opti_img(data, config['optiMode'], config['colors']) or b''
|
||||
|
Loading…
x
Reference in New Issue
Block a user