Due to my research i found out, making requests through a proxy in python can be implemented like in the following code:
import requests
proxy = ['121.129.127.209']
url = 'https://httpbin.org/ip'
response = requests.get(url,proxies={"http": proxy, "https": proxy})
print(response.json())
I already use methods of instaloader like get_posts() or retrieving profile information like biography or is_private etc.
How can i call these functions including a proxy? Does something have to be changed in the instaloader lib, because there is the session handling?
Tips and further readings are very welcome. Thanks in advance.
Instaloader support HTTPS proxies by setting HTTPS_PROXY environment variable, if that is an option. If is a requests feature described here: http://docs.python-requests.org/en/master/user/advanced/#proxies.