Fix pattern matching

This commit is contained in:
taizan_hokuto
2020-10-03 22:04:09 +09:00
parent e29b3b8377
commit 748778f545
4 changed files with 44 additions and 10 deletions

View File

@@ -116,11 +116,12 @@ class HTMLArchiver(ChatProcessor):
def _encode_img(self, url):
err = None
for _ in range(3):
for _ in range(5):
try:
resp = httpx.get(url)
resp = httpx.get(url, timeout=30)
break
except (NetworkError, ReadTimeout) as e:
print("Network Error. retrying...")
err = e
time.sleep(3)
else: