tolino-python icon indicating copy to clipboard operation
tolino-python copied to clipboard

Error 503

Open KnKay opened this issue 4 years ago • 12 comments

Hi all,

at the moment I get only 503 using the tool. Not too sure, worked fine yesterday. Using Thalia.de!

Anyone else having issues? I wonder a bit, as the webreader is working. Just the Python app getting those strange Server errors. Working at the moment on a Go version (as I needed something nice to learn a bit). Having the same error. Also using a second account.

KnKay avatar Oct 27 '21 18:10 KnKay

Same here. There seems to be a new challenge to verify that the login page is used by a real person/browser and not via script. Unfortunately sending all kinds of headers does not fix the issue. Looks like a challenge using JavaScript.

First attempts using https://github.com/venomous/cloudscraper failed :-/

patrickvogel avatar Oct 28 '21 16:10 patrickvogel

As far as I understand they enabled a Cloudflare DDoS protection.

tobexyz avatar Oct 28 '21 19:10 tobexyz

I was able to login and upload using cloudscraper instead of the plain request: https://pypi.org/project/cloudscraper/

Now I get an error during logout and sometimes following error cloudscraper.exceptions.CloudflareChallengeError: Detected a Cloudflare version 2 challenge, This feature is not available in the opensource (free) version.

https://github.com/tobexyz/tolino-python/commit/60bbb5f8b434feddc3cd60c0a5ebead599d0731d

tobexyz avatar Oct 28 '21 20:10 tobexyz

Wow. This is a fast reply and fix. Thank you!

KnKay avatar Oct 28 '21 21:10 KnKay

Okay. Tested around a bit. Using a cloudflare scraper indeed solved my issue.

Not yet implemented anything in python. Once my go version is working I may back port it!

KnKay avatar Oct 29 '21 16:10 KnKay

did your go version run stable? I am very often getting the error cloudscraper.exceptions.CloudflareChallengeError: Detected a Cloudflare version 2 challenge, This feature is not available in the opensource (free) version. using the python module. Maybe the go based scraper is more useful... Do you like to share your code?

tobexyz avatar Oct 29 '21 17:10 tobexyz

Stable as it get's having my skills. ;) At the moment I only login, register and fight with strange chars in the inventory. I started last week, so there is not that much.

Anyway, I will make a github repo open source. Let me do the inventory, so there is at least something useful in it!

KnKay avatar Oct 29 '21 18:10 KnKay

Ok, alright I'm looking forward to it :) I'll keep on trying to fix it based on this python code

tobexyz avatar Oct 29 '21 18:10 tobexyz

Ok, alright I'm looking forward to it :) I'll keep on trying to fix it based on this python code

https://github.com/KnKay/golino

KnKay avatar Oct 29 '21 20:10 KnKay

My observation is that the CloudflareChallengeError occurs mainly when you have sent a lot of requests to the server. That was probably the reason why all my requests failed yesterday: In the background my Docker container was in an endless loop requesting and failing 🙈

But I have no clue, why the error always occurs at the logout. I played a bit with "sleep()" to delay the request a bit, but that didn't change anything.

patrickvogel avatar Oct 29 '21 22:10 patrickvogel

I worked around this by adding a method to use an existing hardware ID and auth token to bypass the login entirely for the time being; it's not the most user friendly but it does work, as the actual BOSH API doesn't seem to have any of this, it's literally just on Thalia's auth (and every other shop running on their backend...). If this persists I might merge @tobexyz's fix, but for the time being I would really rather not add too much to bypass anti-bot measures as I have a feeling it might get the Tolino alliance's attention in a bad way and would sort of go against the entire "be a good bot" thing. I don't exactly want anyone to get their account with all of their books banned.

darkphoenix avatar Nov 03 '21 14:11 darkphoenix

PSA: Hello there. I have stopped maintaining this library, as I do not own a Tolino anymore. If this library is still useful to you, I'd want to hand it over to a new maintainer. Thank you.

hzulla avatar Jan 03 '22 07:01 hzulla