summary refs log tree commit diff
path: root/URLget.py
diff options
context:
space:
mode:
Diffstat (limited to 'URLget.py')
-rw-r--r--URLget.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/URLget.py b/URLget.py
index abe27a1..701b10d 100644
--- a/URLget.py
+++ b/URLget.py
@@ -1,3 +1,4 @@
+import sys
 class URLgetException(Exception):
     pass
 
@@ -6,7 +7,7 @@ try:
     from curl_cffi import requests
 
     # from curl_cffi.requests.exceptions import HTTPError
-    print("using curl_cffi")
+    if sys.stderr.isatty(): print("using curl_cffi",file=sys.stderr)
 
     def urlget(url):
         # probably want to impersonate "chrome", "safari" or "safari_ios"
@@ -24,7 +25,7 @@ except ModuleNotFoundError:
     from urllib.request import Request, urlopen
 
     # from urllib.error import HTTPError
-    print("using urllib.request")
+    if sys.stderr.isatty(): print("using urllib.request",file=sys.stderr)
 
     def urlget(url):
         # update as needed I guess