Wenn Sie eine Verbindung zur Google Ads API über einen Proxy herstellen möchten, können Sie die http_proxy
-Konfiguration in der Datei google-ads.yaml
festlegen:
# Proxy configuration
###############################################################################
# Below you can specify an optional proxy configuration to be used by #
# requests. If you don't have username and password, just specify host and #
# port. #
# #############################################################################
http_proxy: INSERT_PROXY_HERE
Sie können beispielsweise http://user:pass@localhost:8082
als Proxy angeben.
Alternativ können Sie die Proxyeinstellung programmatisch mit den GoogleAdsClient
-Methoden load_from_dict
, load_from_env
und load_from_string
konfigurieren, wie bei jeder anderen Konfiguration. Beispiel:
config = {
...
"http_proxy": "INSERT_PROXY_HERE",
}
googleads_client = GoogleAdsClient.load_from_dict(config)
Legen Sie die Umgebungsvariable GOOGLE_ADS_HTTP_PROXY
fest, um einen Proxy mit der Methode load_from_env
zu verwenden.