-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How connect proxy in steampy? #202
Comments
I am also interested in this topic! As I can see, now the steam.py does not have the function of using a proxy. In addition, I do not yet know how to implement the usual use of a proxy, which is possible in the case of sending post and get requests in the steam.py function, which are just transitions between us and the final requests to steam. / Мне тоже интересна эта тема! Как я вижу , сейчас у steam.py нет функции использования прокси. Кроме того , я пока не знаю , как можно внедрить обычное использование прокси , которое возможно в случае отправки запросов post и get в функции steam.py , которые являются лишь переходниками между нами и конечными запросами к стиму. |
Let me ask you: is this option also suitable? (this is for private proxies)
|
Good afternoon, I want to raise this topic again. Is there any official method for connecting a proxy? |
Official not, If anyone want to add it I will gladly merge it |
I create a Pull Request #278 Changes:
Example:from steampy.client import SteamClient
client = SteamClient(
api_key='XXXXX5FXXDDXXXXXABECXXB0C86XXXXX',
username='steam_login',
password='steam_password',
steam_guard='account.maFile',
proxies={
"http": "http://login:password@host:port",
"https": "http://login:password@host:port",
},
autologout = False)
client.login()
print(client.is_session_alive()) Session Control:Also i add option Now you can save session cookies and re-use it later.import json
cookies = client._session.cookies.get_dict()
with open('steam_cookies.json', 'w', encoding='utf-8') as f:
json.dump(f, cookies) re-use example:from steampy.client import SteamClient
import json
with open('steam_cookies.json', 'r', encoding='utf-8') as f:
cookies = json.load(f)
client = SteamClient(
api_key = ...,
username = ...,
password = ...,
steam_guard = ...,
proxies = ...,
cookies = cookies,
autologout = False)
print(client.is_session_alive()) |
Please rebase you commits onto newest steampy version and make 1 commit out of your changes so it is easier to review |
Merged |
No description provided.
The text was updated successfully, but these errors were encountered: