FailSpy / humble-steam-key-redeemer

Python script to extract all Humble Bundle keys and redeem them on Steam automagically.
132 stars 28 forks source link

Email addresses with modifier break script #39

Closed MDKAOD closed 1 year ago

MDKAOD commented 1 year ago

I use a humble account with a '+' modifier, this breaks the script with the following error:

Traceback (most recent call last):
  File "E:\humble-steam-key-redeemer-main\humblesteamkeysredeemer.py", line 907, in <module>
    humble_login(driver)
  File "E:\humble-steam-key-redeemer-main\humblesteamkeysredeemer.py", line 263, in humble_login
    username = input("Humble Email: ")
               ^^^^^^^^^^^^^^^^^^^^^^^
EOFError: EOF when reading a line

Probably should sanitize the string

Additional information:

Traceback (most recent call last):
  File "E:\humble-steam-key-redeemer-main\humblesteamkeysredeemer.py", line 916, in <module>
    export_mode(driver,order_details)
  File "E:\humble-steam-key-redeemer-main\humblesteamkeysredeemer.py", line 752, in export_mode
    best_match = match_ownership(owned_app_details,tpk)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: match_ownership() missing 1 required positional argument: 'filter_live'
FailSpy commented 1 year ago

Dang, never thought to test that. Sorry you hit up against this, will look into a fix.

MDKAOD commented 1 year ago

I added another comment above. I'm sure sanitizing the input is all that's needed. I'm pretty inexperienced, but likely just need a statement that checks for + modifiers (google uses them to filter email see here.)

Check Stack Overflow for a hint: https://stackoverflow.com/questions/32054891/python-input-sanitization and https://www.educative.io/answers/how-to-sanitize-user-input-in-python

And no apologies, friend. You're doing a service, any support is appreciated, but should never expected. ;)

FailSpy commented 1 year ago

Just resolved the second comment. Was an oversight on my part. How are you running the script? I ask cause for me '+' doesn't mess up the login. Are you running it through IDLE, perchance?

MDKAOD commented 1 year ago

Batch script through Windows shell (CMD)

Maybe this is a hint? (I don't know where this is coming from, it doesn't drop in the error log, and only shows up in the console)

[41736:20860:0728/215322.154:ERROR:device_event_log_impl.cc(222)] [21:53:22.154] USB: usb_service_win.cc:415 Could not read device interface GUIDs: The system cannot find the file specified. (0x2)
MDKAOD commented 1 year ago

Appears to be working.. I guess the second error corrected whatever was wrong.

CSV export appears to be good to go. Thanks for the support!