mirror of
https://github.com/bellingcat/snscrape.git
synced 2026-06-08 02:28:29 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user