diff --git a/docs/02_concepts/code/05_apify_proxy.py b/docs/02_concepts/code/05_apify_proxy.py index 902ec1f7..43e3f844 100644 --- a/docs/02_concepts/code/05_apify_proxy.py +++ b/docs/02_concepts/code/05_apify_proxy.py @@ -12,7 +12,7 @@ async def main() -> None: return proxy_url = await proxy_cfg.new_url() - Actor.log.info(f'Using proxy URL: {proxy_url}') + # The URL includes the proxy password. Pass it to your HTTP client, don't log it. if __name__ == '__main__': diff --git a/docs/02_concepts/code/05_apify_proxy_config.py b/docs/02_concepts/code/05_apify_proxy_config.py index 948c0fd7..e5f1b0cd 100644 --- a/docs/02_concepts/code/05_apify_proxy_config.py +++ b/docs/02_concepts/code/05_apify_proxy_config.py @@ -16,7 +16,7 @@ async def main() -> None: return proxy_url = await proxy_cfg.new_url() - Actor.log.info(f'Proxy URL: {proxy_url}') + # The URL includes the proxy password. Pass it to your HTTP client, don't log it. if __name__ == '__main__': diff --git a/docs/02_concepts/code/05_custom_proxy.py b/docs/02_concepts/code/05_custom_proxy.py index 43ad2dbf..ec1d47fc 100644 --- a/docs/02_concepts/code/05_custom_proxy.py +++ b/docs/02_concepts/code/05_custom_proxy.py @@ -15,8 +15,7 @@ async def main() -> None: if not proxy_cfg: raise RuntimeError('No proxy configuration available.') - proxy_url = await proxy_cfg.new_url() - Actor.log.info(f'Using proxy URL: {proxy_url}') + proxy_url = await proxy_cfg.new_url() # http://proxy-1.com if __name__ == '__main__': diff --git a/docs/02_concepts/code/05_custom_proxy_function.py b/docs/02_concepts/code/05_custom_proxy_function.py index 41ca5ccc..e2512cb1 100644 --- a/docs/02_concepts/code/05_custom_proxy_function.py +++ b/docs/02_concepts/code/05_custom_proxy_function.py @@ -26,11 +26,11 @@ async def main() -> None: if not proxy_cfg: raise RuntimeError('No proxy configuration available.') + # http://my-custom-proxy-supporting-sessions.com/?session-id=a proxy_url_with_session = await proxy_cfg.new_url('a') - Actor.log.info(f'Using proxy URL: {proxy_url_with_session}') + # http://my-custom-proxy-not-supporting-sessions.com proxy_url_without_session = await proxy_cfg.new_url() - Actor.log.info(f'Using proxy URL: {proxy_url_without_session}') if __name__ == '__main__': diff --git a/docs/02_concepts/code/05_proxy_actor_input.py b/docs/02_concepts/code/05_proxy_actor_input.py index adf0d8d3..4b87f07e 100644 --- a/docs/02_concepts/code/05_proxy_actor_input.py +++ b/docs/02_concepts/code/05_proxy_actor_input.py @@ -15,7 +15,7 @@ async def main() -> None: raise RuntimeError('No proxy configuration available.') proxy_url = await proxy_cfg.new_url() - Actor.log.info(f'Using proxy URL: {proxy_url}') + # The URL includes the proxy password. Pass it to your HTTP client, don't log it. if __name__ == '__main__': diff --git a/docs/02_concepts/code/05_tiered_proxy.py b/docs/02_concepts/code/05_tiered_proxy.py index 7e98f1d6..57ee7839 100644 --- a/docs/02_concepts/code/05_tiered_proxy.py +++ b/docs/02_concepts/code/05_tiered_proxy.py @@ -19,7 +19,7 @@ async def main() -> None: await proxy_configuration.initialize() proxy_url = await proxy_configuration.new_url() - Actor.log.info(f'Using proxy URL: {proxy_url}') + # Pass the URL to your HTTP client. if __name__ == '__main__':