Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Any way change profile settings? #314

Closed
OliverTrust opened this issue Feb 25, 2021 · 7 comments
Closed

Any way change profile settings? #314

OliverTrust opened this issue Feb 25, 2021 · 7 comments
Labels

Comments

@OliverTrust
Copy link

OliverTrust commented Feb 25, 2021

Avatar - no way,
nickname and status - change_status()
profile link - ?
real name - ?
country - ?
About myself - ?

And other settings (profile theme and etc)

@rossengeorgiev
Copy link
Contributor

Not at the moment. There is an attempt at avatar upload in #290

@step-FLOOR-ring
Copy link

Are there any plans to get community settings changed in the near future? Wouldn't mind the ability to change custom profile URLs!

@rossengeorgiev
Copy link
Contributor

rossengeorgiev commented Mar 10, 2021

It's just a single request.

wa = WebAuth('<username>')
wa.cli_login()

resp = wa.session.post('https://steamcommunity.com/profiles/{:d}/edit/'.format(wa.steam_id),
                       files={'json': (None, 1)},  # forces multi-part encoding
                       data={
                         'sessionID': a.session_id,
                         'type': 'profileSave',
                         'personaName': 'PinkComodo',
                         'real_name': 'John Smith',
                         'customURL': '',
                         'summary': 'line1\nline2\nline3\n🔥🔥🔥',
                         'country': 'US',
                         'state': 'CA',
                         'city': 239,  # Fairfield
                         'hide_profile_awards': 1,
                       })

print(resp.json())
# {'success': 1, 'errmsg': ''}

https://steamcommunity.com//actions/QueryLocations/ - Gives you countries, and CC
https://steamcommunity.com//actions/QueryLocations/US/ - Gives you states
https://steamcommunity.com//actions/QueryLocations/US/CO - Gives you cities and their cityid

@OliverTrust
Copy link
Author

@rossengeorgiev. awesome! Thank you! The only thing left is to change the avatar...

@OliverTrust
Copy link
Author

OliverTrust commented Apr 16, 2021

Try this way, but can't upload avatar. All time 'success': False

avatar = open('1.png', 'rb')
wa = WebAuth(username='login')
wa.cli_login(password='password')
set_avatat_resp = wa.session.post('https://steamcommunity.com/actions/FileUploader/',
                                  timeout=15,
                                  data={
                                      'type': 'player_avatar_image',
                                       'sId': wa.steam_id,
                                       'sessionid': wa.session_id,
                                       'json': 1
                                   },
                                   files={'avatar': avatar}).json()

print(set_avatat_resp)
# {'success': False, 'images': [], 'hash': None, 'message': ''}

@rossengeorgiev
Copy link
Contributor

You have to see what the browser sends exactly, and replicate the same request. Also, make sure the image is the correct size.

@ValvePython ValvePython locked and limited conversation to collaborators Apr 22, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

3 participants