From b9709730185fd544071aa874c5274924b0e247c5 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Thu, 19 Nov 2020 00:09:39 +0400 Subject: [PATCH] ConnectionResetError handling. --- scrapthechan/scraper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scrapthechan/scraper.py b/scrapthechan/scraper.py index 016f377..429e642 100644 --- a/scrapthechan/scraper.py +++ b/scrapthechan/scraper.py @@ -106,3 +106,6 @@ class Scraper: remove(filepath) except HTTPError as e: print(e, f.download_url) + except ConnectionResetError: + print("Remote host reset connection for", f.download_url, \ + "Try again later.")