Emersont1/itchio

Broken on Python 3.10

TheFrenchGhosty opened this issue · 16 comments

Both scripts doesn't seem to work on Python 3.10:

itch-download:

Traceback (most recent call last):
  File "/home/user/.local/bin/itch-download", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.10/site-packages/itchiodl/downloader/__main__.py", line 21, in main
    l = itchiodl.LoginAPI(user, password)
  File "/home/user/.local/lib/python3.10/site-packages/itchiodl/login.py", line 29, in LoginAPI
    raise RuntimeError
RuntimeError

itch-load-bundle:

Traceback (most recent call last):
  File "/home/user/.local/bin/itch-load-bundle", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.10/site-packages/itchiodl/bundle_tool/__main__.py", line 12, in main
    b.load_games()
  File "/home/user/.local/lib/python3.10/site-packages/itchiodl/bundle.py", line 14, in load_games
    pages = int(s.select("span.pager_label a")[-1].text)
IndexError: list index out of range

Works fine on Python 3.9

I'm running python 3.10.2 on my machine and it works fine, these seem to be more issues with you logging in?

I think the first one is a duplicate of #22

I need to do some more experiments, but I think if you've not logged into the desktop app before running this, it won't work.

@Emersont1

I need to do some more experiments, but I think if you've not logged into the desktop app before running this, it won't work.

With Python 3.9 I don't need to login into the desktop app.

Have you tried with an API key?

First issue doesn't appear with an API key... which is weird considering Username/Password works fine with 3.9

Username/Password works flawlessly on 3.10.2 on my machine.

image
It works fine on 3.10.2, it must be an issue with your machine

I have no idea what might be causing this honestly. I really don't know.

I've pushed v1.2.1, this should give more detail on the error. If you could post it, censoring any secret data, that would be smashing, and hopefully I can resolve this

Error: success key is not true
Will print the response text (Please be careful as this may contain personal data or allow others to login to your account):
{"recaptcha_url":"https:\/\/itch.io\/captcha","success":false,"recaptcha_needed":true}
Traceback (most recent call last):
  File "/home/user/.local/bin/itch-download", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.10/site-packages/itchiodl/downloader/__main__.py", line 25, in main
    l = itchiodl.LoginAPI(user, password)
  File "/home/user/.local/lib/python3.10/site-packages/itchiodl/login.py", line 46, in LoginAPI
    raise RuntimeError
RuntimeError

Here's the issue, there's a captcha.

Are you running this on a domestic IP or a datacenter IP?

Datacenter IP

That'd be it then

So I guess it's a non-issue, and I should just stick to API key.

Might be nice to have itch-load-bundle support API key too

The Web scraper needs to be run over HTTP, so you'll have to run that on your PC

Got it, thanks.