From 2fdd892f8c4a56247840fcb2e64c07f518b4bfbb Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sun, 8 Nov 2020 12:28:04 -0800 Subject: direct some more warnings to sys.stderr, not stdout --- python/sandcrawler/ia.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/sandcrawler/ia.py') diff --git a/python/sandcrawler/ia.py b/python/sandcrawler/ia.py index 639fab8..e2e97a7 100644 --- a/python/sandcrawler/ia.py +++ b/python/sandcrawler/ia.py @@ -818,7 +818,7 @@ class SavePageNowClient: non-200 remote statuses, invalid hosts/URLs, timeouts, backoff, etc. """ if capture_outlinks: - print(" capturing outlinks!", file=sys.stdout) + print(" capturing outlinks!", file=sys.stderr) if not (self.ia_access_key and self.ia_secret_key): raise Exception("SPN2 requires authentication (IA_ACCESS_KEY/IA_SECRET_KEY)") if request_url.startswith("ftp://"): @@ -858,7 +858,7 @@ class SavePageNowClient: "Didn't get expected 'job_id' field in SPN2 response: {}".format(resp_json)) job_id = resp_json['job_id'] - print(f" SPNv2 running: job_id={job_id} url={request_url}", file=sys.stdout) + print(f" SPNv2 running: job_id={job_id} url={request_url}", file=sys.stderr) # poll until complete final_json = None -- cgit v1.2.3