-
-
Notifications
You must be signed in to change notification settings - Fork 113
Conversation
tools/its.py
Outdated
# prüfen, ob Cookies gesetzt wurden und in Session übernehmen | ||
try: | ||
cookie = driver.get_cookie("bm_sz") | ||
time.sleep(10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sleep muss noch raus
Vielleicht hier noch ergänzend zu dem Thema...: Was man auch noch testen könnte, dass man bei Zeile 256 in der Funktion
hier noch weiteres klicken mit pause einzufügen kann
Hatte damals die Erfahrung mit meinem Bot gemacht, dass bereits 2 mal i wo klicken viel gebracht hat bezüglich dem Bot-Schutz (aktuell sind es hier ja nur 1 klick). |
ich habe gerade die Änderungen ausprobiert |
Falls du das in meinem Branch ausprobiert hast liegt es vermutlich daran das alte Chrome Driver darin sind. |
Da hast du recht. Hab nur die Befürchtung dass es wieder geblockt wird wenn immer genau dasselbe Verhalten abgespielt wird. |
Ich arbeite normalerweise nicht mit GitHub, ich habe Deinen Branch wie folgt auf den original Beta Branch angewendet:
|
Warum nicht die statischen Werte durch Random Werte ersetzen? |
tools/its.py
Outdated
'Cookie': cookies | ||
}) | ||
|
||
"Es die Cookies müssen manuell im Browser generiert werden.\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes danke
Hab die Vorschläge mit random Werten hinzugefügt. Klappt bei mir sehr gut, allerdings nicht headless. Schlägt die automatisierte Generation fehl wird der Nutzer aufgefordert manuell zu Klicken. |
@sinun98 kannst du das noch einbauen? geht bestimmt auch eine weitere Range, von 0-500 oder so edit: sehe grad du hasts schon, vllt noch range anpassen. Wenn wir von Pixeln reden sind 1-9 Pixel nicht so viel haha |
Done |
tools/its.py
Outdated
@@ -255,9 +255,15 @@ def driver_enter_code(self, driver, plz_impfzentrum): | |||
# Maus-Bewegung hinzufügen (nicht sichtbar) | |||
action.move_by_offset(10, 20).perform() | |||
time.sleep(randint(1, 3)) | |||
action.move_by_offset(randint(1, 9), randint(1, 9)).perform() | |||
try: | |||
action.move_by_offset(randint(1, 100), randint(1, 100)).perform() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Man muss halt aufpassen, dass nicht aus versehen irgendwo auf einen Link geklickt wird
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wäre ja nicht schlimm oder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ne stimmt, da hatte ich einen Denkfehler, die Cookies bleiben ja erhalten, selbst wenn man auf die Startseite weitergeleitet wird ^^
Jedoch hätte ich evtl. noch einen anderen Verbesserungsvorschlag
Du könntest das ganze ja in einer Schleife machen, dann bräuchtest du nicht so viele Zeilen und nur 1 try / except
for i in range(3):
try:
action.move_by_offset(randint(1, 100), randint(1, 100)).perform()
time.sleep(randint(1, 3))
except Exception as error:
#evt fehler in den Logs speichern, damit man weiß was los war
pass
Kann man adden oder auch nicht