Open eurealty opened 3 years ago
You know, there are too much work for the refactoring, I don't know how to make it correctly and not to break an existing api. But you have two options:
# install modified version
pip install git+https://github.com/mercuree/html-telegraph-poster.git@pass_request
then you can create an instance like this (anyway i didn't test it):
# use the docs to configure it [properly ](https://docs.python-requests.org/en/master/user/advanced/#proxies)
proxies = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
r = requests.Session()
r.proxies.update(proxies)
t = TelegraphPoster(use_api=True, request=r)
I tried it, but it doesn't work for me. Most likely it's my bad hands) But without "import requests" the code doesn't work, and when I import "requests", it sends everything from any specified proxy (for example: 1.1.1.1:1111), which means sending through proxies doesn't work.
Hello. Could you add the ability to work through a proxy? Best regards.