Configure proxies for translators
masterYou can use proxies with any supported translator by passing a proxies dictionary to the translator class. The dictionary should map protocols (e.g., http, https) to the proxy address.
from deep_translator import GoogleTranslator
# define your proxy configs:
proxies_example = {
"https": "your https proxy", # example: 34.195.196.27:8080
"http": "your http proxy if available"
}
translated = GoogleTranslator(source='auto', target='de', proxies=proxies_example).translate("this package is awesome")