Instaloader: [question] make requests through proxy

Created on 6 Aug 2018  路  1Comment  路  Source: instaloader/instaloader

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.

question

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

1337-Pete picture 1337-Pete  路  3Comments

i-cant-git picture i-cant-git  路  3Comments

aaasddd picture aaasddd  路  4Comments

clublek picture clublek  路  3Comments

remlap picture remlap  路  3Comments