Reduce the logging level of retryable retrieval errors from WARNING to INFO

There is no real need to report these as WARNINGs as snscrape tries and in most cases manages to recover. Without --verbose, snscrape's output can be confusing (see #76). If the retries fail as well, snscrape will still log that as an ERROR and crash loudly.
This commit is contained in:
JustAnotherArchivist
2020-10-11 22:29:27 +00:00
parent b1a7b9607f
commit ffd9289edc

View File

@@ -89,7 +89,7 @@ class Scraper:
except requests.exceptions.RequestException as exc:
if attempt < self._retries:
retrying = ', retrying'
level = logging.WARNING
level = logging.INFO
else:
retrying = ''
level = logging.ERROR
@@ -107,7 +107,7 @@ class Scraper:
else:
if attempt < self._retries:
retrying = ', retrying'
level = logging.WARNING
level = logging.INFO
else:
retrying = ''
level = logging.ERROR