Skip to content

Commit dbcc7b4

Browse files
committed
Log proxy only for non-premium methods
1 parent 4612d84 commit dbcc7b4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scholarly/_navigator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ def _get_page(self, pagerequest: str, premium: bool = False) -> str:
112112
w = random.uniform(1,2)
113113
time.sleep(w)
114114
resp = session.get(pagerequest, timeout=timeout)
115-
self.logger.debug("Session proxy config is {}".format(pm._proxies))
115+
if premium is False: # premium methods may contain sensitive information
116+
self.logger.debug("Session proxy config is {}".format(pm._proxies))
116117

117118
has_captcha = self._requests_has_captcha(resp.text)
118119

0 commit comments

Comments
 (0)